Package org.eclipse.ui

Examples of org.eclipse.ui.IPropertyListener


     *            the id of the property that changed
     */
    protected void firePropertyChange(final int propertyId) {
        Object[] array = getListeners();
        for (int nX = 0; nX < array.length; nX++) {
            final IPropertyListener l = (IPropertyListener) array[nX];
            Platform.run(new SafeRunnable() {

                public void run() {
                    l.propertyChanged(this, propertyId);
                }
            });
        }
    }
View Full Code Here


    editor.init(site, input);
    Composite parent2 = new Composite(getContainer(),
        getOrientation(editor));
    parent2.setLayout(new FillLayout());
    editor.createPartControl(parent2);
    editor.addPropertyListener(new IPropertyListener() {
      public void propertyChanged(Object source, int propertyId) {
        MultiPageEditorPart.this.handlePropertyChange(propertyId);
      }
    });
    // create item for page only after createPartControl has succeeded
View Full Code Here

     * @param propertyId the id of the property that changed
     */
    protected void firePropertyChange(final int propertyId) {
        Object[] array = getListeners();
        for (int nX = 0; nX < array.length; nX++) {
            final IPropertyListener l = (IPropertyListener) array[nX];
            try {
                l.propertyChanged(WorkbenchPart.this, propertyId);
            } catch (RuntimeException e) {
                WorkbenchPlugin.log(e);
            }
        }
    }
View Full Code Here

    private void addPaneListener() {
        IWorkbenchPartSite site = getSite();
        if (site instanceof PartSite) {       
            final WorkbenchPartReference ref = ((WorkbenchPartReference)((PartSite) site).getPartReference());
            ref.addInternalPropertyListener(
                    new IPropertyListener() {
                        public void propertyChanged(Object source, int propId) {
                            if (handleZoomEvents) {
                                if (propId == WorkbenchPartReference.INTERNAL_PROPERTY_ZOOMED) {
                                    setStandby(!ref.getPane().isZoomed());
                                }
View Full Code Here

        try {
            introPart = workbench.getWorkbenchIntroManager()
                    .createNewIntroPart();
            // reset the part name of this view to be that of the intro title
            setPartName(introPart.getTitle());
            introPart.addPropertyListener(new IPropertyListener() {
                public void propertyChanged(Object source, int propId) {
                    firePropertyChange(propId);
                }
            });
            introSite = new ViewIntroAdapterSite(site, workbench
View Full Code Here

            @Override
            public void run() {
              try {
                final IEditorPart editor = page.openEditor(
                    editorInput, descFinal.getId());
                editor.addPropertyListener(new IPropertyListener() {
                  public void propertyChanged(Object source,
                      int propId) {
                    if (IEditorPart.PROP_DIRTY == propId) {
                      if (editor instanceof AbstractDecoratedTextEditor && (!editor.isDirty())) {
                        System.out.println("Save");
View Full Code Here

  public void createPartControl(Composite parent) {
    try {
      // Don't split when EditorInput isn't IFileEditorInput
      if(!(getEditorInput() instanceof IFileEditorInput)){
        editor.init(getEditorSite(), getEditorInput());
        editor.addPropertyListener(new IPropertyListener() {
          public void propertyChanged(Object source, int propertyId) {
            firePropertyChange(propertyId);
          }
        });
        editor.createPartControl(parent);
        return;
      }
     
      SashForm sash = null;
      if(isHorizontal){
        sash = new SashForm(parent,SWT.VERTICAL);
      } else {
        sash = new SashForm(parent,SWT.HORIZONTAL);
      }
      site = new SplitEditorSite(editor, getEditorSite());
      editor.init(site, getEditorInput());
      editor.addPropertyListener(new IPropertyListener() {
        public void propertyChanged(Object source, int propertyId) {
          firePropertyChange(propertyId);
        }
      });
      editor.createPartControl(sash);
View Full Code Here

      editor = new SplitPageHTMLEditor(this,false,createHTMLSourceEditor(getSourceViewerConfiguration()));
    } else if(type.equals("tab")){
      editor = new MultiPageHTMLEditor(this,createHTMLSourceEditor(getSourceViewerConfiguration()));
    } else {
      editor = createHTMLSourceEditor(getSourceViewerConfiguration());
      editor.addPropertyListener(new IPropertyListener() {
        public void propertyChanged(Object source, int propertyId) {
          firePropertyChange(propertyId);
        }
      });
    }
View Full Code Here

    @Override
    public IEditorPart openForm(final IFile formFile, final FormNode formNode) throws CoreException {
        editor = (WYSIWYGHTMLEditor) IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), formFile, EDITOR_ID, true);
        editor.setFormNode(formNode);
        editor.addPropertyListener(new IPropertyListener(){

            public void propertyChanged(Object source, int propId) {
                if (propId == WYSIWYGHTMLEditor.CLOSED && formFile.exists()) {
                    String op = "create";
                    try {
View Full Code Here

        parent1.setBackground(ColorConstants.titleInactiveBackground);
      }
    });
    SWTUtils.workaroundResize(parent1);
    editor.createPartControl(parent1);
    editor.addPropertyListener(new IPropertyListener() {
      public void propertyChanged(Object source, int propertyId) {
        SashEditorPart.this.handlePropertyChange(propertyId);
      }
    });
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IPropertyListener

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.