当前位置: 首页>>代码示例>>Java>>正文


Java IWorkbenchPartConstants类代码示例

本文整理汇总了Java中org.eclipse.ui.IWorkbenchPartConstants的典型用法代码示例。如果您正苦于以下问题:Java IWorkbenchPartConstants类的具体用法?Java IWorkbenchPartConstants怎么用?Java IWorkbenchPartConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IWorkbenchPartConstants类属于org.eclipse.ui包,在下文中一共展示了IWorkbenchPartConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doSaveAs

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
public void doSaveAs( )
{
	getActivePageInstance( ).doSaveAs( );
	setInput( getActivePageInstance( ).getEditorInput( ) );
	// update site name
	IReportProvider provider = getProvider( );
	if ( provider != null )
	{
		setPartName( provider.getInputPath( getEditorInput( ) )
				.lastSegment( ) );
		firePropertyChange( IWorkbenchPartConstants.PROP_PART_NAME );
		getProvider( ).getReportModuleHandle( getEditorInput( ) )
				.setFileName( getProvider( ).getInputPath( getEditorInput( ) )
						.toOSString( ) );
	}

	updateRelatedViews( );
	fireDesignFileChangeEvent( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:20,代码来源:MultiPageReportEditor.java

示例2: openModule

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
/**
 * This was the body of the <code>execute</code>, but was pulled out so it could be
 * used in other places to open a module.
 * 
 * @param moduleName
 */
public static void openModule(String moduleName) {
    if (moduleName == null)
    {
        throw new RuntimeException("Module was null" );
    }
    Spec spec = Activator.getSpecManager().getSpecLoaded();
    final IFile module = ResourceHelper.getLinkedFile(spec.getProject(), ResourceHelper.getModuleFileName(moduleName));
    if (module == null)
    {
        throw new RuntimeException("Module " + moduleName + " could not be found" );
    }

    // open the editor
    IEditorPart part = UIHelper.openEditor(OpenSpecHandler.TLA_EDITOR, new FileEditorInput(module));
    part.addPropertyListener(new IPropertyListener() {

        public void propertyChanged(Object source, int propId)
        {
            if (IWorkbenchPartConstants.PROP_DIRTY == propId)
            {
                // here the listeners to editor changes go into
                
            } 
        }
    });

}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:34,代码来源:OpenModuleHandler.java

示例3: propertyChanged

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
public void propertyChanged(Object source, int propId)
{
  if (propId == IWorkbenchPartConstants.PROP_TITLE
      && lastActiveEditor != null)
  {
    String newTitle = lastActiveEditor.getTitle();
    if (!lastEditorTitle.equals(newTitle))
    {
      recomputeTitle();
    }
  }
}
 
开发者ID:debrief,项目名称:limpet,代码行数:13,代码来源:ApplicationWorkbenchWindowAdvisor.java

示例4: setInput

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
/**
    * Sets the input to this editor.
    * 
    * <p><b>Note:</b> Clients must fire the {@link IEditorPart#PROP_INPUT } 
    * property change within their implementation of 
    * <code>setInput()</code>.<p>
    *
    * @param input the editor input
    */	
@Override
public void setInput(IEditorInput input) {
	super.setInput(input);
	if (treeViewer != null) {
		PlanEditorModel model = PlanEditorModelRegistry.getPlanEditorModel(input);
	    treeViewer.setInput(model.getEPlan());
	    treeViewer.setEditorModel(model);
	}
	firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);		
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:20,代码来源:MergeEditor.java

示例5: setInput

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
@Override
public void setInput(IEditorInput input) {
	super.setInput(input);
	if (daysComposite != null) {
		daysComposite.setInput(input);
	}
	firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:9,代码来源:DaysEditor.java

示例6: setInput

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
/**
 * Required by IReusableEditor - change our editor to a new input.
 * Unconditionally remove the existing input if there is one, undoing listeners and providers.
 * If the given input is not null, set the editor to work on it. Finally, notify that the
 * dirty and input properties have changed.
 * @param input the new input which is to replace the existing input
 */
@Override
public void setInput(IEditorInput input) {
	unsetOldInput();
	if (input == null) {
		setPartName("<disposed>");
	} else {
		setNewInput(input);
	}
	setPageInputs(input);

	firePropertyChange(ISaveablePart.PROP_DIRTY);
	// following the instructions from the javadoc on IReusableEditor
	firePropertyChange(IWorkbenchPartConstants.PROP_INPUT);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:22,代码来源:MultiPagePlanEditor.java

示例7: internalSetContentDescription

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
void internalSetContentDescription(String description) {
	Assert.isNotNull(description);

	// Do not send changes if they are the same
	// if (Util.equals(contentDescription, description)) {
	// return;
	// }
	this.contentDescription = description;

	firePropertyChange(IWorkbenchPartConstants.PROP_CONTENT_DESCRIPTION);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:12,代码来源:WorkbenchPart.java

示例8: internalSetPartName

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
void internalSetPartName(String partName) {
	// partName = Util.safeString(partName);

	Assert.isNotNull(partName);

	// Do not send changes if they are the same
	// if (Util.equals(this.partName, partName)) {
	// return;
	// }
	this.partName = partName;

	firePropertyChange(IWorkbenchPartConstants.PROP_PART_NAME);

}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:15,代码来源:WorkbenchPart.java

示例9: setAllInput

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
private void setAllInput( FileEditorInput input )
{
	// This for a bug. When close editor, the resource listener fire to
	// multi page editor, but all embedded pages disposed.
	if ( pages == null )
	{
		return;
	}

	setInput( input );

	if ( getEditorInput( ) != null )
	{
		setPartName( getEditorInput( ).getName( ) );
		firePropertyChange( IWorkbenchPartConstants.PROP_PART_NAME );
		firePropertyChange( IWorkbenchPartConstants.PROP_PART_NAME );
		getProvider( ).getReportModuleHandle( getEditorInput( ) )
				.setFileName( getProvider( ).getInputPath( getEditorInput( ) )
						.toOSString( ) );
	}

	for ( Iterator it = pages.iterator( ); it.hasNext( ); )
	{
		Object page = it.next( );
		if ( page instanceof IReportEditorPage )
		{
			( (IReportEditorPage) page ).setInput( input );
		}
	}
	updateRelatedViews( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:32,代码来源:IDEMultiPageReportEditor.java

示例10: propertyChanged

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
public void propertyChanged( Object source, int propId )
{
	if ( propId == IWorkbenchPartConstants.PROP_PART_NAME )
	{
		setPartName( instance.getPartName( ) );
	}

	firePropertyChange( propId );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:10,代码来源:ReportEditorProxy.java

示例11: setDirty

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
protected void setDirty(boolean newValue) {
	if (this.isDirty != newValue) {
		this.isDirty = newValue;
		firePropertyChange(IWorkbenchPartConstants.PROP_DIRTY);
	}
}
 
开发者ID:mondo-project,项目名称:mondo-integration,代码行数:7,代码来源:HawkMultiPageEditor.java

示例12: handlePropertyChangedEvent

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
private void handlePropertyChangedEvent( int propertyId ) {
  if( propertyId == IWorkbenchPartConstants.PROP_INPUT ) {
    updateContent();
  }
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:6,代码来源:ImageViewerEditor.java

示例13: refresh

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
/**
 * @param property one of IWorkbenchPartConstants.PROP_ constants
 *
 */
public void refresh(int property) {
    switch (property) {
    case IWorkbenchPartConstants.PROP_DIRTY:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:dirty");
        }
        setToolTipText(tabArea.getPresentation().getPartTooltip(part));
        setPartText(null);
        partIsDirty = part.isDirty();
        tabArea.layoutTabs();
        break;
    case IWorkbenchPartConstants.PROP_TITLE:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:changed title");
        }
        setToolTipText(tabArea.getPresentation().getPartTooltip(part));
        setPartText(null);
        break;
    case IWorkbenchPartConstants.PROP_PART_NAME:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:changed name");
        }
        setToolTipText(tabArea.getPresentation().getPartTooltip(part));
        setPartText(null);
        break;
    case IWorkbenchPartConstants.PROP_INPUT:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:changed input");
        }
        setToolTipText(tabArea.getPresentation().getPartTooltip(part));
        setPartText(null);
        break;
    case IWorkbenchPartConstants.PROP_PREFERRED_SIZE:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:changed pref_size");
        }
        break;
    case IWorkbenchPartConstants.PROP_CONTENT_DESCRIPTION:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:changed content descr");
        }
        break;
    default:
        if(PresentationPlugin.DEBUG_STATE) {
            System.out.println("PartTab:changed?");
        }
        return;
    }
    if(!isHidden()) {
        redraw();
    }
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:57,代码来源:PartTab.java

示例14: propertyChanged

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
public void propertyChanged(Object source, int propId) {
	if (propId == IWorkbenchPartConstants.PROP_TITLE) {
		setDefaultContentDescription();
	}
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:6,代码来源:ViewPart.java

示例15: propertyChanged

import org.eclipse.ui.IWorkbenchPartConstants; //导入依赖的package包/类
public void propertyChanged(Object source, int propId) {
	if (propId == IWorkbenchPartConstants.PROP_TITLE) {
		setDefaultPartName();
	}
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:6,代码来源:EditorPart.java


注:本文中的org.eclipse.ui.IWorkbenchPartConstants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。