eclipse plugin: Fix some warnings

This commit is contained in:
Timotei Dolean 2011-08-06 21:12:33 +00:00
parent 2a61a55a20
commit 8dbb34fbc6
3 changed files with 16 additions and 24 deletions

View file

@ -49,8 +49,6 @@ public class WMLDocHandler extends AbstractHandler
public void process( XtextResource resource ) public void process( XtextResource resource )
throws Exception throws Exception
{ {
WMLDocInformationPresenter presenter_ = null;
ITextSelection selection = ( ITextSelection ) editor ITextSelection selection = ( ITextSelection ) editor
.getSelectionProvider( ).getSelection( ); .getSelectionProvider( ).getSelection( );
Point positionRelative = editor Point positionRelative = editor
@ -75,29 +73,23 @@ public class WMLDocHandler extends AbstractHandler
editedFile.getProject( ) ) editedFile.getProject( ) )
.getDefines( ).get( macro.getName( ) ); .getDefines( ).get( macro.getName( ) );
if( define != null ) { if( define != null ) {
if( presenter_ == null ) { WMLDocInformationPresenter presenter = new WMLDocInformationPresenter(
presenter_ = new WMLDocInformationPresenter(
editor.getSite( ).getShell( ), editor.getSite( ).getShell( ),
new WMLDocMacro( define ), new WMLDocMacro( define ),
positionAbsolute ); positionAbsolute );
presenter_.create( ); presenter.create( );
} presenter.open( );
presenter_.open( );
} }
} }
else if( grammarElement instanceof WMLTag ) { else if( grammarElement instanceof WMLTag ) {
if( presenter_ == null ) { WMLDocInformationPresenter presenter = new WMLDocInformationPresenter(
presenter_ = new WMLDocInformationPresenter(
editor.getSite( ).getShell( ), editor.getSite( ).getShell( ),
new WMLDocTag( new WMLDocTag( editedFile, installName,
editedFile,
installName,
( ( WMLTag ) grammarElement ) ( ( WMLTag ) grammarElement )
.getName( ) ), .getName( ) ),
positionAbsolute ); positionAbsolute );
presenter_.create( ); presenter.create( );
} presenter.open( );
presenter_.open( );
} }
} }
} ); } );

View file

@ -176,7 +176,7 @@ public class AddonsView extends ViewPart
public void run( ) public void run( )
{ {
downloadAddon( ); downloadAddon( );
}; }
}; };
manager.add( downloadAction ); manager.add( downloadAction );
} }

View file

@ -100,7 +100,7 @@ public class WizardGenerator extends WizardTemplate
tags.append( ( ( WizardGeneratorPageTag ) page ).getContent( ) ); tags.append( ( ( WizardGeneratorPageTag ) page ).getContent( ) );
} }
else { else {
; // skip 404 pages // skip 404 pages
} }
} }
result += ( keys.toString( ) + tags.toString( ) ); result += ( keys.toString( ) + tags.toString( ) );