Exemplo n.º 1
0
 /** Gets called when the URI textfield changes to check the input for mistakes and trim it. */
 protected void dialogChanged() {
   String text = uriField.getText();
   text = text.trim();
   if (!text.endsWith(".ecore")) {
     setPageComplete(false);
   } else {
     setPageComplete(true);
     getNextPage();
   }
   if (!uriField.getText().matches(text)) {
     uriField.setText(text);
   }
   Wizard supWizard = (Wizard) wizard;
   supWizard.getContainer().updateButtons();
   if (getNextPage() != null) {
     getNextPage().setTreeInput(geteP());
   }
 }
 private Shell getShell() {
   Assert.isTrue(fWizard == null || fShell == null);
   if (fWizard != null) return fWizard.getContainer().getShell();
   else if (fShell != null) return fShell;
   else return JavaPlugin.getActiveWorkbenchShell();
 }