Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Feb 7, 2012
  1. @misto
  2. @misto

    Merge pull request #65 from scala-ide/issue/move-class-refactoring-10…

    misto authored
    Issue/move class refactoring 1000422
Commits on Feb 6, 2012
  1. @misto

    Initial commit of the Move Class refactoring.

    misto authored
    You can either move a single class from a file with multiple definitions to its
    own file, or move the complete file. The package declaration will be updated,
    and the imports/references to the moved class are adjusted in the project. The
    refactoring is also involved when a source file is moved from the package
    Of course Move Class also works on Traits and Objects.
    Some restrictions: it works only on Scala sources, and not across multiple
    projects. Also, visibility issues that might arise are completely ignored.
    I also implemented Iulian's suggestion to filter the files in the project and to
    only create an index for those that contain the name of the class we move or
    rename. This speeds up renaming and moving considerably.
    Apart from the refactoring changes, I also had to change how existing
    compilation units are reconciled: When moving a compilation unit, the
    presentation compiler is reset and reconciles all the managed units. At this
    point, the moved compilation unit doesn't exist anymore, resulting in an
    Exception later on because the resource can't be found anymore. So now we only
    reconcile units that exist.
    Fixes #1000422, #1000836, #1000842
Commits on Feb 3, 2012
  1. @dotta

    Improved logging infrastructure and plugged Log4J in the…

    dotta authored
    We used to have too many alternatives to create log items (Eclipse Log
    framework, our ad-hoc naive internal Logger and println statements originating
    from scalac). In short, we did not have an ideal logging infrastructure.
    Now, I plugged Log4J as the backend logger (I'll refer to it as the "default
    logger" in the rest of this commit message), which replaces our naive ad-hoc
    Logger. Further, all log events occurring in the Eclipse Log Framework are now
    *forwarded* to the default logger. Also, the Standard Output and Standard Error
    are *redirected* to the default logger.  The  goal is to have a single place
    to consult the log, and that is now the *scala-ide.log* file that is produced
    by the default logger, located in
    It's easy to consult the log from within Eclipse, just open the Eclipse
    Preferences, then Scala > Logging, and there is a link to open the
    *scala-ide.log* file in the editor (though, mind that it is not automatically
    refreshed while it's open).
    From the same preference's page, you can also control the amount of produced
    log, i.e., you can set the log level that better suits you (the default level
    is WARNING).  If needed, you can also enable a console appender to print all
    produced log items in the console (this is quite handy when doing development
    on the Scala IDE sources).
    To get a handle on the loggers you simply need to mix-in the HasLogger trait,
    which contains a reference to both the default logger and the Eclipse Log. You
    may wonder why we have two loggers. The reason is simple, if you want to
    communicate a message to the user, you should use the Eclipse Log. This becayse
    messages sent to the Eclipse Log are shown in the Eclipse Log View (remember
    that all messages sent to the Eclipse Log are also forwarded to the default
    logger, so you don't need to log the same message twice). In all other cases,
    you should use th default logger.
    Finally, I removed the "plugininfo" option, which it was used to enable debug
    information in the ScalaIndexBuilder. As a matter of fact, the amount of logged
    information can now be easily controlled through Log Levels.
    One element I'm not happy with is that I plugged Log4J within the
    scala-ide.sdt.core project and not as an external plug-in. I've tried to do so
    but failed due to my lack of understanding of OSGi.  This is something that I
    believe we should do at some point (maybe someone can help with this?!).
    Fixes #1000880.
  2. @dotta

    Deleted the lib/miglayout.jar binary and updated the…

    dotta authored
    …re POM to
    copy the miglayout dependencies in the lib/ folder. This has a consequence in
    our project's setup (yes, the dev doc has been updated), which is: you need to
    compile the project from the command line *before* starting to work on the
    Scala IDE sources in Eclipse.  That because the project's dependencies are
    copied in the lib folder when maven runs the build of the
    org.scala-ide.sdt.core project.
Commits on Jan 25, 2012
  1. @dragos
Commits on Jan 19, 2012
  1. @misto

    Fix for the latest scala-refactoring library.

    misto authored
    Change is now a trait, so we need to use TextChange.
Commits on Jan 18, 2012
  1. @dotta

    Merged branch platform/indigo-3.7 back in master (all changes have been

    dotta authored
    squashed in a single commit). Thanks a lot Eric for your great work.
    Here follows the list of changes applied in this commit:
    - Created a repo.ajdt entry and use 2.1.3 for JDT 3.7 (we could also use AJDT
      2.2 snapshot, but I still think it's better to use the currently released
      AJDT and move to 2.2 only after it is officially released).
    - Use Eclipse Indigo release site (this fixes JDK 7 builds).
    - Pass isMember correctly derived if the owner is a class.  Obtain jdtFlags
      using ScalaJavaMapper.mapModifiers(symbol)
    - Add flags and methodParameter to ScalaLocalVariableElement.
    Re #1000852.
Commits on Jan 16, 2012
  1. @dragos
Commits on Jan 12, 2012
  1. @misto

    Perform code-completion and import-adding in one step.

    misto authored
    We need to to code-completion and import-adding in one step, otherwise
    we risk that adding the import fails because the code-completion has
    changed the underlying file and the AST positions are out of date for
    the refactoring-library.
    Fixes #1000854.
Commits on Jan 11, 2012
  1. @dragos

    Improved UI for Scala completions.

    dragos authored
    - when a proposal is chosen, its parameter names are inserted
      in place of the arguments, and the editor is put in 'link' mode:
      Tab moves the caret to the next argument, Esc and ';' move the caret
      to the end of the argument list (and exits the linked mode). Hitting
      <enter> moves the caret to the end, unless it comes after an opening
      brace -> that means a closure is needed, and the editor is put out
      of the linked mode
    - context information works now. A method signature (parameter names and
      types) are shown above the completion point, and the current argument
      is correctly highlighted (bold). When the cursor leaves the argument list,
      the context information window is now removed.
Commits on Jan 3, 2012
  1. @dotta

    Updated 'know issues' link in the 'Scala Setup Diagnostic' popup to p…

    dotta authored
    …oint to new location of the user documentation. no review.
    (cherry-picked: 9f539fc)
Commits on Dec 9, 2011
  1. @skyluc

    Changed the Scala library/compiler version check

    skyluc authored
    It know checks at the major/minor level, not lower. And logs an error if
    it cannot find a match.
    Fix #1000793
    (cherry picked from commit 8112072)
  2. @dragos

    Fixed build to adapt to new scalariform API.

    dragos authored
    (cherry picked from commit 9b7d398)
Commits on Dec 8, 2011
  1. @skyluc

    One step closer. Eclipse compiler to follow sbt requests.

    skyluc authored
    Added code to update on the fly the delta used by the Eclipse Java compiler, so it compiles
    the file requested by sbt.
    It works fine for RE #1000607 on my system.
    For RE #1000388, it is only part of the solution. It mostly works but sometimes sbt doesn't request the recompilation of the
    dependent Java class.
    (cherry picked from commit fbfffa2)
  2. @skyluc

    Made the Scala interpreter view more visible.

    skyluc authored
    added to the scala perspective list of views.
    created a 'Scala' view group.
    Fix #1000791
Commits on Dec 6, 2011
  1. @dragos

    Removed the AJDT weaving dependency so that we are more

    dragos authored
    compatible with Spring IDE and AJDT.
    Copied the corresponding code from the AJDT plugin
    to our aspects code. Kept the same two extension points.
    Changed the update site to show only the Scala IDE
    feature (binary and source). The weaving feature is
    a nested feature in the SDT feature, because it needs its
    own license.
    Added LICENSE files. The Scala license for the project,
    and the EPL for the org.scala-ide.sdt.aspects bundle.
    Fixed #1000780.
  2. @skyluc

    Fixed completion problem for overloaded method.

    skyluc authored
    When trying to removed duplicate types, the code was also removing
    overloaded method. Modified the check so it is more precise.
    Added regression test.
    Fix #1000654
    (cherry picked from commit 7517a03)
Commits on Nov 25, 2011
  1. @dotta

    Added Eric Molitor in the contributors section of the Scala IDE (in t…

    dotta authored
    …he plugin's About menu). Thanks a lot Eric for all your good work!
Commits on Nov 23, 2011
  1. @skyluc

    Re #1000764. Refreshing presentation compiler data

    skyluc authored
    Play 2.0 works fine in Scala IDE, except for the fact that information in the presentation compiler
    about file changed in the filesystem is not correctly updated.
    This change detect those changes, and trigger the presentation compiler.
    Cherry-picked from 795e18f
Commits on Nov 21, 2011
  1. @skyluc
  2. @skyluc

    Tweaks for Re #1000757

    skyluc authored
    - configured the new marker ids as extensions, so they are visible in the UI.
    - recursively removed all marker in the projects with invalid classpath, and fixed the test.
  3. @misto
  4. @dragos

    Better build error management, and cleaned up interactions between bu…

    dragos authored
    …ild, compiler settings,
    and class path validation errors.
    1. The class path validator deletes all Java and Scala error markers *only* when there is an
       class path error.
    2. Build errors, settings errors and class path errors have different marker IDs.
    3. Invalid setting errors are now reported. Until now they went unreported.
    4. Fixed #1000757.
Commits on Nov 17, 2011
  1. @dragos
Commits on Nov 16, 2011
  1. @dotta
  2. @dotta

    Entities nested in a Type Member definition are *not* traversed, beca…

    dotta authored
    …use the Eclipse Java Outline that we currently
    use does not handle members defined in a {{{ org.eclipse.jdt.internal.core.SourceField }}} (which is the data structure
    we use to expose type members definition to JDT).
    For instance, the following is not correctly handled by the Outline when you click on the nested member `a`:
        {{{type AkkaConfig = a.type forSome { val a: AnyRef }.
    Hence, for safety, currently it is better to skip all children altogether. Fix #1000748.
  3. @dotta

    Ticket Re #1000741 raised the question of whether we needed an open e…

    dotta authored
    …ditor to check if the MethodBinding passed to
    the ScalaMethodVerifierProvider is indeed abstract (the reported NPE exception was not generating any issue, it was
    simply creating lot of noise in the Eclipse Error Log view).
    The answer is no, and I updated the code accordingly. Now, we check if the MethodBinding belongs to a trait only
    if the MethodBinding is declared in a Scala file (we look at the file's extension to infer this). That makes much
    more sense and allowed to re-enable all tests in jcompiler package.
    Any exception occuring in this code is still being logger in the Error Log view, that because I believe that now
    the code should work as expected (and if it doesn't, I'd prefer not to be silent so that the issue is reported and
    we can look into it).
    Added also one test to check that the case of a trait providing the implementation of a method declared in a Java
    interface is correctly handled.
    Scala entitites with a {{{ protected }}} access modifier are now exposed to JDT as {{{ public }}}. This emulates
    the Scala compiler behavior. Fix #1000751.
    Some Scala types (e.g., AnyRef, Any, Array, ...) with no generic signature were not correctly converted in the
    ScalaMethodVerifierProvider. Fix #1000752.
    Integrated Iulian's feedback (pull request #42).
    Resolved Conflicts:
  4. @dragos

    Don't assume there is an open editor for all compilation units that a…

    dragos authored
    …re subject to
    reconciliation. Fixes crashes in the semantic highlighter.
  5. @dragos
Commits on Nov 15, 2011
  1. @dragos

    A shot in the dark, since I cannot reproduce this error. However, it …

    dragos authored
    …looks reasonable to not crash if the class path is incomplete. This guards against a known SBT bug:
    I also removed some tabs.
    Test #1000741.
Commits on Nov 13, 2011
  1. @dotta

    Replaced all calls to ScalaPlugin.check and ScalaPlugin.checkOrElse w…

    dotta authored
    …ith Utils.tryExecute.
    I believe the latter better describes the method's intention.
Commits on Nov 10, 2011
  1. @dragos
  2. @dragos

    Integrated review comments.

    dragos authored
  3. @dragos

    Don't read classfile bytes if the classfile is not part of a Scala pr…

    dragos authored
    …oject. This may cause large delays when the class files are on a network mounted file system.
    Fixed #1000742, Fixed #1000233, Fixed #1000643.
Something went wrong with that request. Please try again.