import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
/**
* This wizard creates one file with the extension
public void run() {
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
- page.openEditor(file);
+ IDE.openEditor(page,file,true);
} catch (PartInitException e) {
}
}
final int precLastDot = fileName.lastIndexOf('.',lastDot-1);
if (precLastDot == -1) return null;
if (!fileName.substring(precLastDot+1,lastDot).toUpperCase().equals("CLASS")) return null;
- return fileName.substring(0,precLastDot-1);
+ return fileName.substring(0,precLastDot);
}
/**