Added ScalaCodeTokenizer.tokenize which takes a String instead of an IDocument.

ScalaCodeTokenizer.tokenize asked for a IDocument only to right away get the IDocument's contents and then never use it again. It makes more sense to just take the contents as a string directly, which is what this change does.
Also deprecated ScalaCodeTokenizer.tokenize(IDocument, Int, Int).

(cherry picked from commit 2754e16c032e3dd70bbd09a20c36ae1f23322274)
Improved new ScalaCodeTokenizer.tokenize API to minimise allocation of string objects on caller side.

(cherry picked from commit 1c2db9513ffaea7c13b6260b87c6179c72e7895b)
Deprecated ScalaCodeScanner.tokenize(IDocument, Int, Int) incorrectly handled offset in generated tokens.

Also added a test.

Fixes bug introduced (into master) by SHA: e17b2ae97aaa5644d0cf1ad09ff6bc5ad039002a

(cherry picked from commit b9c41d8d2c5bddd88c471b297c53e2f3539014f2)
remove controversial & undocumented deprecation

(cherry picked from commit 9cd3d4f641aed2beab6d4133b8703c35893bd5ab)
Merge pull request #521 from huitseeker/issue/backport-tokenize-1001866

[Backport] Backport changes to the ScalaCodeScanner tokenizer
Merge pull request #522 from dotta/backport/semantic-highlighting-on-classfiles

Backport/semantic highlighting on classfiles
Bump version to 3.0.2-SNAPSHOT for next development cycle

This should have been done right after we cut the 3.0.1 release
(i.e., development for 3.0.2 started with SHA:
25cd2a35963b27f9569660d17de7948122d44f2f).
Merge pull request #524 from dotta/3.0.x/bump-version

3.0.x/bump version
Revert "Sync 'isDefined' in presentation compiler cache."

This reverts commit 3608a8191c91062aa608beb77da930cdc3c8cda7.

We need to revert this because of a possible deadlock at startup between the PC
and the classpath resolution. More information on the related ticket (#1001875).

backport to release/scala-ide-3.0.x

Review by @dragos

Re #1001880
Fixes #1001875
(cherry picked from commit 0858c9edf116890c92353bd67f752d1da9b82058)
Merge pull request #530 from dotta/backport/3.0.x/rollback-additional-pc-synchronization-because-of-deadlock-at-startup

Backport/3.0.x/rollback additional pc synchronization because of deadlock at startup
Removed unused `mainContent` from `MainClassVerifierTest`
(cherry picked from commit fc433bf4b7e723f15d36f346f5329a1f4bb43379)
Ran auto-formatting on ScalaLaunchDelegate to ease backporting
Dumbed down `MainClassVerifier` to only check class vs module mismatch

Experience taught us that `MainClassVerifier` is trying to be too smart, and
often prevents user from launching perfectly fine Scala launch configurations.
The last manifestation was that it would prevent users from launching a main if
defined in a JAR.

The matter was discussed with the team and the agreed descision is to reduce
the scope of the `MainClassVerifier` to only prevent users from:

* launching a Scala application if the project contains build errors, and
* provide feedback when trying to launch a Scala `class`, instead of a `object`

Consequently, we no longer prevent users from launching a Scala application
that is incorrectly configured (i.e., the classfile doesn't exist). The
consequence is that a `NoClassFoundException` will be reported to the user in
this case, which actually matches the behavior in the Eclipse Java support.

Let's dive into the details and describe what are the extent of the changes
carried out by this commit:

* Check for build errors is performed only if the a classfile for the
  `mainTypeName` provided in the Run config can't be found. Hence, if the
  classfile exist, this allows you to run your application even if there are
  errors in the project.

* `ScalaLaunchDelegate.finalLaunchCheck` does not longer call `super`. This is
  to avoid the Java Eclipse prompt is displayed. Instead, the `UIReporter` is
  called, and I've improved it to be a standard platform dialog. The improved
  dialog also allows users to by-pass the check.

* This patch consciously breaks source compatibility (because I removed the
  `MainClassVerifier` constructor, and deleted the `ErrorReporter` trait).
  I could re-introduce them and use deprecation, but it doesn't seem worth the
  effort (and none has complained about this change during the review process).

backport to release/scala-ide-3.0.x

Re #1001882
Fixes #1001878
(cherry picked from commit 25095ec1501c2eff97e576b272413c078b7f2241)
Merge pull request #536 from dotta/backport/3.0.x/pr-529

Backport/3.0.x/pr 529
Merge remote-tracking branch 'origin/release/scala-ide-3.0.x' into merge/3.0.x-into-3.0.x-juno
Merge pull request #538 from dotta/merge/3.0.x-into-3.0.x-juno

Merge/3.0.x into 3.0.x juno