Permalink
Browse files

Removed unnecessary instanceof check

  • Loading branch information...
1 parent 602da78 commit c7937f2d2edf4efa3cbe6d68fea9d82870066429 Arvid Berg committed with Mar 23, 2010
View
5 ....ui.sdfeditor/src/net/bioclipse/cdk/ui/sdfeditor/editor/MultiPageMoleculesEditorPart.java
@@ -214,13 +214,12 @@ public void doSave( IProgressMonitor monitor ) {
@Override
public void doSaveAs() {
IMoleculesEditorModel model = moleculesPage.getModel();
- IResource original = null;
+ IFile original = null;
if(model instanceof IFileMoleculesEditorModel) {
original = ((IFileMoleculesEditorModel)model).getResource();
}
SaveAsDialog saveAsDialog = new SaveAsDialog( this.getSite().getShell() );
- if (original instanceof IFile )
- saveAsDialog.setOriginalFile( (IFile) original );
+ saveAsDialog.setOriginalFile( (IFile) original );
int result = saveAsDialog.open();
if ( result == 1 ) {
logger.debug( "SaveAs canceled." );

0 comments on commit c7937f2

Please sign in to comment.