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;

NetBeans 7.0 Beta

mit vielen Neuerungen, einige rund um die Sprachmöglichkeiten von Java 7. Von http://netbeans.org/community/releases/70/:

JDK 7

  • Project Coin support
  • Editor enhancements: Code completion, hints

WebLogic Server

  • Streamlined and faster deployment to WebLogic
  • New server runtime node displaying deployed applications and resources
  • JSF integration with server libraries

Oracle Database

  • Simplified connection wizard
  • Guided installation to JDBC driver
  • Editing and deployment of stored procedures

JDK 7 switch
WebLogic
Oracle DB

GlassFish

  • GlassFish 3.1 support
  • Domain restart and log viewer for remote GlassFish
  • Enable and disable deployed applications

Java

  • Maven 3 support
  • JUnit 4.8.2 integration and various JUnit improvements
  • Remote HTTP URLs supported for Javadoc in libraries and Java platforms
  • New improved visual customizer for GridBagLayout

Java EE

  • Improved support for CDI, REST services and Java Persistence
  • New support for Bean Validation
  • Support for JSF component libraries, including bundled PrimeFaces library
  • Improved editing for Expression Language in JSF, including code completion, refactoring and hints

GlassFish remote view
GridBag designer
JavaEE code completion

Web Languages

  • HTML5 editing support
  • JSON formatter

PHP

  • Generate PhpDoc
  • Rename refactoring, Safe Delete Refactoring
  • PHP 5.3 – Support for aliases

C/C++

  • Easy import of project from user’s existing binary
  • New Project type where user’s source files are located on remote system

NetBeans Platform

General

  • Word wrap in Editor
  • Enhanced Profiler integration
  • Less intrusive checking for external changes when switching between the IDE and other programs.

HTML5 code completion
php
C/C++
Platform annotation action

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.

NetBeans 6.9 Beta

Eclipse 3.6 kommt, Eclipse e4 kommt und auch neue Version von NetBeans ist auf dem Weg. Die Version 6.9 glänzt in vielen Bereichen und alle hier im Blog aufzulisten wäre zu viel. Seht selbst unter http://wiki.netbeans.org/NewAndNoteworthy69. Interessant finde ich die IDE-Unterstützung für OSGi und Nutzung proprietärer APIs wie Jersey REST Client API. Schon bei der letzten Versionen von NetBeans wurde so das Swing Application Framework beim Neue-Swing-Anwendung-Wizard eingeführt. Während die REST Client API stabil und populär ist, ist es aber das Swing App Framework nicht, denn es erfährt keine öffentliche Unterstützung. Wer also denkt, mit NetBeans eine langlebige Gui-Anwendung mit dem Swing App Framework zu erstellen, ist später vermutlich am Po gekniffen.

Insgesamt wäre ich glücklicher, wenn die Entwickler mehr an Java 7 arbeiten würden, als an einer IDE. Aber NetBean ist zumindest unverzichtbar als Java 7 IDE.

Eclipse 3.5SR2 ist raus. Und immer noch diese dumme Fehler drin,…

… nämlich das trotz Bestätigung der Lizenzbedingungen der Next und Finish Button deaktiviert bleibt. Hier bleibt nichts anderes übrig, als es mehrfach zu versuchen bis es klappt. Der Fehler scheint erst in Eclipse 3.6 behoben zu sein.

Links:

IntelliJ IDEA 9 ist draußen – kommerziell und die Open-Source-Version

Die Webseite http://www.jetbrains.com/idea/whatsnew/index.htm listet die wichtigsten Neuerungen auf:

Teil von IntelliJ IDEA wird Open-Source

Laut Blog-Eintrag unter http://blogs.jetbrains.com/idea/2009/10/intellij-idea-open-sourced/ wird es eine freie quelloffene Community-Edition geben:

I believe you’ll like this announcement — IntelliJ IDEA has just gone open-source! Check out the press release as well as the new jetbrains.org community site for the details. We all will soon get a lot of new friends and colleagues in our IntelliJ IDEA community!

Starting with the upcoming version 9.0, IntelliJ IDEA will be offered in two editions: Community Edition and Ultimate Edition. The Community Edition focuses on Java SE technologies, Groovy and Scala development. It’s free of charge and open-sourced under the Apache 2.0 license. The Ultimate edition with full Java EE technology stack remains our standard commercial offering. See the feature comparison matrix for the differences.

Briefly, in the free Community Edition you’ll get all the Java code support — various refactorings and code inspections, coding assistance; debugging, TestNG and JUnit testing; CVS, Subversion and Git support; Ant and Maven build integration; and Groovy and Scala support (through a separate plugin). To learn more and download the Public Preview of IntelliJ IDEA 9 Community Edition, please visit the IntelliJ IDEA Community Edition site.

The IntelliJ platform, the common foundation for all our IDEs (IDEA, RubyMine, WebIDE or MPS), is being open-sourced under the APL 2.0, too.

Das Video http://www.jetbrains.com/idea/training/demos/CE/introduction_to_community_edition.html stellt die Community Edition kurz in einem Video vor.

NetBeans 6.8 Milestone 1

Gibt es nun auch zum Downloaden unter http://bits.netbeans.org/netbeans/6.8/m1/. Und die News gibt es hier unter http://wiki.netbeans.org/NewAndNoteworthyNB68. Interessant ist:

  • Milestone1 enables basic support for development of applications for Java Enterpise Edition v6.
  • support for JPA 2.0
  • Initial PHP 5.3 support
  • Upgraded bundled JRuby to 1.3.1
  • Support for creating Rails 2.3.2 apps with dispatchers
  • Neue Profiling tools für C++
  • Issue tracking integration now supports JIRA

IDE-Woche: Eclipse 3.5, NetBeans 6.7, IntelliJ 9 M1

So viel IDE gab es noch nie. In einer Woche drei wichtige Neuerungen.