Eclipse-Plugin: Shell-Script-Editor (ShellEd) und Remote System Explorer (RSE)

ShellEd (Bild) ist ein Shell-Script-Editor für Unix-Skripte (also ash, bsh, bash, csh, ksh, sh, zsh). Mit Manual und Vervollständigung. Interessant dazu ist das relativ unbekannte Target Management Project, wo man remote, etwa über SSH oder FTP auf einem Server arbeiten und zum Beispiel Dokumente editieren kann.

Mehr Eclipse-Plugins gibt’s unter http://www.tutego.de/java/eclipse/plugin/eclipse-plugins.html.

Neues Eclipse Release: 4.2 (Juno) ist fertig

Download wie üblich unter http://www.eclipse.org/downloads/. Die Neuigkeiten sind groß, http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/news/index.html, insbesondere für RCP-Entwickler:

Der 3er Zweig läuft aus.

PS: Unser tutego Eclipse Kurs http://tutego.de/g/ECLPSRCP/ schult auf Wunsch komplett auf Eclipse 4.

Ein paar Tage Eclipse 3.7, was (immer noch) nervt

Installiert Eclipse IDE 3.7 for Java EE Onkels

  1. Immer wieder bekomme ich beim Starten von Apps die Meldung “Selection does not contain a main type”. Sehr ärgerlich!
  2. Schreibt man eine Klasse wie “class A impl” kann man beim “impl” Strg+Space drücken und man bekommt “implements” vervollständigt. Schreibt man jedoch “enum A impl” und drückt dann Strg+Space passiert nichts. Wie blöd, denn enums können Schnittstellen implementieren.
  3. Ein Refactoring “Extract Interface…” führt in der Schnittstelle zu public abstract-Methoden. Gar nicht schön.
  4. In JSP-Dateien wird der EL-Operator eq immer noch nicht erkannt, es gibt bei “${(10*10) ne 100} == false” ein “Syntax error on token "ne100", delete this token”. Das ist totaler Blödsinn.
  5. JSP-Daten mit EL führen zu Warnungen: ${10 mod 4} == 2 führt zu “The declared exception IOException is not actually thrown by the method _elExpression69() …”
  6. Nach dem Starten bekommt die Konsole nicht mehr automatisch den Fokus?
  7. Nimm die Deklaration

    public class Application
    {
      public static void main( String[] arguments )
      {
        int MAX = 0;
      }
    }

    und aktiviere den Quick-Assist auf MAX, um aus der lokalen Variablen eine Attribut zu machen. Eclipse nennt die Variable mAX.

  8. Refactoring funktioniert plötzlich nicht mehr. Nach dem Aufruf von Alt+Shirt+R macht Eclipse einfach nichts. Gar nichts. Bei einem anderen Refactoring bleibt Eclipse plötzlich in der Mitte stehen, benannt in meinem Fall eine Schnittstelle selbst um, aber die Nutzer nicht. Ein Neustart behob das Problem.

Kann das bitte jmd. fixen 🙂

Was sind eure Erfahrungen?

Warten auf Eclipse 3.7.1 für Java 7

Es ist schön zu sehen, das Compiler/AST im Eclipse-Repository schon Java 7 können: http://wiki.eclipse.org/JDT_Core/Java7. Das einzige was jetzt noch fehlt ist Formatter, Indexer, Code-Assistenten, also eher UI-Stuff.

Im Moment ist Eclipse 3.6 (Hellios) aktuell und Eclipse 3.7 (Indigo) wird laut Foundation kommen: “Our target is to complete 3.7 in late June 2011”. Das heißt also, dass Eclipse 3.7 vor Java 7 fertig sein wird. (Ja, wäre schön gewesen, wenn sich Oracle und IBM/Eclipse abgesprochen hätten. Und die Versionsnummer hätten auch so gut gepasst.) Die Java 7 Funktionalität wird in Version 3.7.1 nachgeliefert.

Eclipse 3.5 zu Eclipse 3.6 –> @SuppressWarnings("unchecked") und @SuppressWarnings("rawtypes")

Von http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/porting/3.6/incompatibilities.html Punkt 3:

@SuppressWarnings("unchecked") does not ignore raw types warnings anymore

What is affected: Usage of @SuppressWarnings("unchecked").

Description: Up to Eclipse 3.5, @SuppressWarnings("unchecked") was used to suppress the unchecked and raw types warnings. This was not consistent with other compilers (e.g. javac). A new warning token "rawtypes" has been added to cover the case of raw type warnings exclusively. So in order to get rid of all warnings, in Eclipse 3.6, it might be required to add "rawtypes" in the warning token list.

If it is not possible to update the code, a system property (-DsuppressRawWhenUnchecked=true) can be added to the -vmargs list on startup. This preserves the old behavior. The projects need to be manually cleaned and rebuilt after toggling the property.

Action required: When new warnings that were previously ignored are now reported, add "rawtypes" to the list of warning tokens.

Before:

@SuppressWarnings("unchecked")
    void bar(List list) {
        List<String> ls2 = list;
    }
@SuppressWarnings("unchecked")
private List l;

After:

@SuppressWarnings({"unchecked", "rawtypes"})
    void bar(List list) {
        List<String> ls2 = list;
    }
@SuppressWarnings("rawtypes")
private List l;

Eclipse TPTP wird eingestellt

Sehr schade, denn TPTP fand ich als freie Profiling-Umgebung ganz cool (wenn auch nicht besonders performant). Die Testumgebung habe ich nie benutzt…

http://www.eclipse.org/tptp/home/project_info/devplans/EclipseTPTPProjectPlan2010.htm schreibt:

The Eclipse Test and Performance Tools Platform (TPTP) Project provides an open platform supplying powerful frameworks and services that allow software developers to build unique test and performance tools, both open source and commercial, that can be easily integrated with the platform and with other tools.

After many successful releases of TPTP, the project has evolved and matured. However, participation in the project has dwindled over time. TPTP has been in maintenance mode since TPTP 4.5.0 and at this point of the project cycle, the PMC has decided that TPTP 4.7 will be the last major release of TPTP (part of the Eclipse Helio release). We will be participating in the upcoming Helios services releases (TPTP 4.7.1 for Helios SR1 and TPTP 4.7.2 for Helios SR2) but will not be part of the next major Eclipse release (Eclipse 3.7, a.k.a. Indigo).

Once TPTP 4.7.2 is released in February 2011, we plan to follow the Eclipse archiving process to archive the remaining TPTP projects, which means that the mailing lists, newsgroups, website, and completed CVS/SVN repository will be stored in an archive (a zip or tar.gz) on the eclipse.org servers. The projects to be archived include:

· Platform

· Testing Tools

· Trace & Profiling Tools

· Monitoring Tools (archiving already approved by the EMO in May 2010)

Und warum also die Einstellung? Open Source funktioniert eben nur, wenn viele mitmachen.

Frage: Was benutzt ihr zum Profilen? Freie Tools (NetBeans, …) oder kommerzielle wie JProfiler, JProbe, … ?

Eclipse WTP 3.2.1 Update mit JAXB Generator und vielen weiteren Neuerungen

Die Eclipse Web Tools Platform ist in der Version 3.2.1. Neben den Java EE , JSF 2.0 Updates, Tomcat 7 Support, JAX-RS Wizards, XPath-View ist auch ein JAXB Schema Generator mit dabei:

JAXB XML Schema Generation
    Dali has added JAXB Schema Generation support to WTP. You can now generate an XML Schema (XSD) for a chosen set of JAXB mapped Java classes in your workspace. Use the "New" wizard at the Workspace, Project, or Package level to access the "JAXB->Schema from JAXB Classes" wizard.
    JAXB Schema Gen
    Select the classes that you want to use for schema generation. Select a project, package, or just individual classes.
    JAXB Schema Gen2
JAXB Class Generation
    Dali has added JAXB class generation support to WTP. Users can now generate classes for a given XML schema (XSD) in their workspace. Use the "Generate" context menu on any schema in a Java project to invoke the wizard.
    JAXB Gen
    JAXB Gen2

Nette Sachen dabei, schaut rein:

private final ist doof bei JAXB

Eclipse kann beim Speichern Aktionen ausführen. So

  • räumt es automatisch die import-Anweisungen auf,
  • entfernt Weißraum am Ende einer Zeile,
  • setzt @Overide an überschriebenen Methoden

Zum Testen habe ich heute morgen eine Einstellung gesetzt, die mir Attribute, die final gemacht werden können, auch final macht. Fand ich nett.

Doch dann kam der Abend. Plötzlich initialisierte meine App keine JAXB Beans mehr ein. Es kostete mich 10 Minuten herauszufinden, dass diese blöde Einstellung das Problem verursacht. Denn wenn statt

@XmlRootElement( name = "course" ) 
@XmlAccessorType( XmlAccessType.FIELD ) 
public class Course 
{ 
  private String htmlkeywords = ""; 
  private String htmlhead = ""; 

steht

… 
public class Course 
{ 
  private final String htmlkeywords = ""; 
  private final String htmlhead = "";

dann wird JAXB die finalen Variablen natürlich nicht mehr initialisieren können. Meine Beans werden nur gelesen, sodass kein Setter die Variablen verändert – die Beans sind immutable. Die Eclipse Save Einstellung das final magisch dranzusetzen passt dazu nicht.