Changeset 419 for trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/wizards
- Timestamp:
- 03/13/06 17:03:22 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/wizards/NewClassWizard.java
r290 r419 76 76 import org.eclipse.ui.INewWizard; 77 77 import org.eclipse.ui.IWorkbench; 78 import org.eclipse.ui.IWorkbenchPage;79 78 import org.eclipse.ui.PartInitException; 80 import org.eclipse.ui.PlatformUI; 81 import org.eclipse.ui.ide.IDE; 79 import org.modelica.mdt.core.IModelicaProject; 82 80 import org.modelica.mdt.core.ModelicaCore; 81 import org.modelica.mdt.core.compiler.CompilerException; 83 82 import org.modelica.mdt.internal.core.CorePlugin; 83 import org.modelica.mdt.internal.core.ErrorManager; 84 84 import org.modelica.mdt.ui.ModelicaImages; 85 85 import org.modelica.mdt.ui.UIPlugin; 86 import org.modelica.mdt.ui.editor.EditorUtility; 86 87 87 88 public class NewClassWizard extends Wizard implements INewWizard … … 419 420 public void run() 420 421 { 421 IWorkbenchPage page =422 PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();423 422 try 424 423 { 425 IDE.openEditor(page, file, true); 424 /* 425 * find the modelica class reference object 426 * and open it in the editor 427 */ 428 IModelicaProject proj = 429 ModelicaCore.getModelicaRoot().getProject(file.getProject(). 430 getName()); 431 EditorUtility.openInEditor 432 (proj.findElement(file.getProjectRelativePath())); 426 433 } 427 434 catch (PartInitException e) … … 434 441 file.getName(), e))); 435 442 } 443 catch (CompilerException e) 444 { 445 ErrorManager.showCompilerError(e); 446 } 447 catch (CoreException e) 448 { 449 ErrorManager.showCoreError(e); 450 } 451 436 452 } 437 453 });
Note: See TracChangeset
for help on using the changeset viewer.