Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.EditorPart


    return messagePage;
  }

  @Override
  protected PageRec doCreatePage(IWorkbenchPart part) {
    EditorPart source = (EditorPart) part;
    IEditorInput editorInput = source.getEditorInput();
    if (editorInput instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) editorInput;
      IResource r = fileInput.getFile();

      TestViewPage testPage = new TestViewPage(r);
View Full Code Here


        Viewer viewer = LayersView.getViewer();
        if (viewer == null)
            ProjectUIPlugin.trace(getClass(), "Layers View is not available", (Exception) null); //$NON-NLS-1$

        UDIGDropHandler dropHandler = new UDIGDropHandler();
        dropHandler.setTarget(new EditorPart(){

            @Override
            public void doSave( IProgressMonitor monitor ) {
            }
View Full Code Here

    return messagePage;
  }

  @Override
  protected PageRec doCreatePage(IWorkbenchPart part) {
    EditorPart source = (EditorPart) part;
    IEditorInput editorInput = source.getEditorInput();
    if (editorInput instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) editorInput;
      IResource r = fileInput.getFile();

      TestViewPage testPage = new TestViewPage(r);
View Full Code Here

      updateManaCurveChart(monitoredDeck);
    }
  }

  private void installUpdateListener(IWorkbenchPart part) {
    EditorPart editorPart = (EditorPart)part;
   
    monitoredDeck = (Deck)editorPart.getEditorInput().getAdapter(Deck.class);
   
    monitoredDeck.addUpdateListener(this);
   
    updateRequiredManaChart(monitoredDeck);
    updateManaCurveChart(monitoredDeck);
View Full Code Here

  }

  @Override
  protected PageRec doCreatePage(IWorkbenchPart part) {
    // getPageBook().dispose();
    EditorPart source = (EditorPart) part;

    FileEditorInput fileInput = (FileEditorInput) source.getEditorInput();
    IResource r = fileInput.getFile();

    TestViewPage testPage = new TestViewPage(r);
    initPage(testPage);
    testPage.createControl(getPageBook());
View Full Code Here

  public void partBroughtToTop(IWorkbenchPart part) {
    // TODO Auto-generated method stub
    //Try creating a default editor EditorPart
    if(part instanceof EditorPart){
      EditorPart epart = (EditorPart)part;
      IEditorInput editorInput = epart.getEditorInput();
         if (editorInput instanceof IFileEditorInput) {
                IFile file = ((IFileEditorInput) editorInput).getFile();
                IProject project = file.getProject();
                System.out.println("pEditor's site" + project);
                //tell this to the ModelGlue View
View Full Code Here

  public Object execute(ExecutionEvent event) throws ExecutionException {
    try {
      EvaluationContext context = (EvaluationContext) event.getApplicationContext();
      IFile xmlFile = getFile(context);
      if (BeansCoreUtils.isBeansConfig(xmlFile)) {
        EditorPart editor = (EditorPart) (context.getParent().getVariable("activePart"));
        NamespaceConfigWizard namespaceWizard = new NamespaceConfigWizard(xmlFile, editor);
        WizardDialog wizardDialog = new WizardDialog(Display.getDefault().getActiveShell(), namespaceWizard);
        wizardDialog.setBlockOnOpen(true);
        wizardDialog.create();
        wizardDialog.open();
View Full Code Here

  private IFile getFile(Object evaluationContext) {
    if (evaluationContext instanceof EvaluationContext) {
      EvaluationContext context = (EvaluationContext) evaluationContext;
      Object activePart = context.getParent().getVariable("activePart");
      if (activePart instanceof EditorPart) {
        EditorPart editor = (EditorPart) activePart;
        IEditorInput editorInput = editor.getEditorInput();
        if (editorInput instanceof FileEditorInput) {
          return ((FileEditorInput) editor.getEditorInput()).getFile();
        }
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.part.EditorPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.