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


Java AbstractUIPlugin类代码示例

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


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

示例1: createFilterControls

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
protected void createFilterControls(Composite con) {
	Label filterLabel = new Label(con,SWT.NONE);
	filterLabel.setText("Filter:");
	GridDataFactory.swtDefaults().applyTo(filterLabel);
	Text filterText = new Text(con, SWT.BORDER);
	filterText.setMessage("(" + PreferenceFilter.MIN_FILTER_CHARS + " chars at least)");
	filterText.addModifyListener(event -> {
		filterChanged(filterText.getText());
	});
	GridDataFactory.fillDefaults().grab(true,false).applyTo(filterText);
	Button clearBtn = new Button(con, SWT.PUSH);
	clearBtn.setImage(AbstractUIPlugin.imageDescriptorFromPlugin(PrefEditorPlugin.PLUGIN_ID,"icons/clear.gif").createImage());
	GridDataFactory.swtDefaults().applyTo(clearBtn);
	clearBtn.addSelectionListener(new SelectionAdapter() {
		
		@Override
		public void widgetSelected(SelectionEvent e) {
			filterText.setText("");
			filterChanged("");
		}
		
	});
}
 
开发者ID:32kda,项目名称:com.onpositive.prefeditor,代码行数:24,代码来源:ViewerPage.java

示例2: createActions

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
private void createActions() {
    newNodeAction = new NewNodeAction(this);
    renameNodeAction = new RenameNodeAction(this);
    deleteNodeAction = new DeleteNodeAction(this);
    moveUpNodeAction = new MoveUpNodeAction(this);
    moveDownNodeAction = new MoveDownNodeAction(this);
    promoteNodeAction = new PromoteNodeAction(this);
    demoteNodeAction = new DemoteNodeAction(this);
    refreshAction = new Action() {
        @Override
        public void run() {
            refresh();
        }
    };
    refreshAction.setText(Messages.getString("CommonStructureControl.RefreshActionText")); //$NON-NLS-1$
    refreshAction.setImageDescriptor(
        AbstractUIPlugin.imageDescriptorFromPlugin(TFSCommonUIClientPlugin.PLUGIN_ID, "icons/Refresh.gif")); //$NON-NLS-1$
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:19,代码来源:CommonStructureControl.java

示例3: init

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
@Override
public void init(final IBuildDefinition buildDefinition) {
    this.buildDefinition = buildDefinition;
    setWindowTitle(Messages.getString("V1AntBuildWizard.WizardTitle")); //$NON-NLS-1$
    setDefaultPageImageDescriptor(
        AbstractUIPlugin.imageDescriptorFromPlugin(TFSTeamBuildPlugin.PLUGIN_ID, "icons/ant_wiz.png")); //$NON-NLS-1$
    setNeedsProgressMonitor(true);

    // setup default workspace.
    if (buildDefinition.getWorkspace().getMappings().length == 0) {
        buildDefinition.getWorkspace().map(
            ServerPath.ROOT + buildDefinition.getTeamProject(),
            BuildConstants.SOURCE_DIR_ENVIRONMENT_VARIABLE);
    }

}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:17,代码来源:V1AntBuildWizard.java

示例4: QueuedBuildsTableControl

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
/**
 * Constructs a {@link QueuedBuildsTableControl}. The {@link IBuildServer}
 * may be <code>null</code> (column text for a V3 build server will be
 * shown); call {@link #setBuildServer(IBuildServer)} to update the control.
 *
 * @param buildServer
 *        the build server to use (may be <code>null</code>)
 */
public QueuedBuildsTableControl(
    final Composite parent,
    final int style,
    final IBuildServer buildServer,
    final String viewDataKey) {
    super(parent, style, IQueuedBuild.class, viewDataKey);
    this.buildServer = buildServer;

    reasonHeaderImage = AbstractUIPlugin.imageDescriptorFromPlugin(
        TFSTeamBuildPlugin.PLUGIN_ID,
        "/icons/ColumnHeaderReason.gif").createImage(); //$NON-NLS-1$

    statusHeaderImage = AbstractUIPlugin.imageDescriptorFromPlugin(
        TFSTeamBuildPlugin.PLUGIN_ID,
        "/icons/ColumnHeaderStatus.gif").createImage(); //$NON-NLS-1$

    setupTableColumns();

    setUseDefaultContentProvider();
    getViewer().setSorter(createSorter());
    getViewer().setLabelProvider(new LabelProvider());
    setEnableTooltips(true, true);

}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:33,代码来源:QueuedBuildsTableControl.java

示例5: SVNPluginAction

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
public SVNPluginAction(IConfigurationElement element) {
	super(element.getAttribute(ATT_LABEL), getStyleFromElement(element));
	this.element = element;
	pluginId = element.getContributor().getName();
	
	createDelegate();
	
	setId(element.getAttribute(ATT_ID));
	setToolTipText(element.getAttribute(ATT_TOOLTIP));
	
	if ((getStyle() == AS_RADIO_BUTTON) || (getStyle() == AS_CHECK_BOX)) {
		String bool = element.getAttribute(ATT_STATE);
		setChecked("true".equals(bool));	//$NON-NLS-1$
	}
	
	String iconPath = element.getAttribute(ATT_ICON);
	if ((iconPath != null) && (iconPath.length() > 0)) {
		ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, iconPath);
		if (desc != null) {
			setImageDescriptor(desc);
		}
	}
	
	 // Give delegate a chance to adjust enable state
       selectionChanged(StructuredSelection.EMPTY);
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:27,代码来源:SVNPluginAction.java

示例6: getImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
public static Image getImage( String pluginID, String image){
   /*--- create from class file location
   ImageDescriptor iDescr = ImageDescriptor.createFromFile(CoreResources.class, name);
   Image image = resourceCache.getImage(iDescr);
   return image;
   --- get workbench shared image
   IWorkbench workbench = PlatformUI.getWorkbench();
   ISharedImages images = workbench.getSharedImages();
   image = images.getImage(ISharedImages.IMG_OBJ_FOLDER);      
   --- image from plugin
   MyPlugin.getImageDescriptor("icons/a_image.gif").createImage();
   AbstractUIPlugin.imageDescriptorFromPlugin(myPluginID, image)).createImage();
    */
   if (Utils.isIDE()) {
      return resourceCache.getImage(AbstractUIPlugin.imageDescriptorFromPlugin(pluginID, image));
   } else {
      return resourceCache.getImage(image);
   }
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:20,代码来源:ResourceUtils.java

示例7: newPluginImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
/**
 * Register an image from the workspace shared image pool. If the image
 * resource does not exist or fails to load, a default "error" resource is
 * supplied.
 * 
 * @param name name of the image
 * @param sharedName name of the shared image ({@link ISharedImages})
 * @return whether the image has correctly been loaded
 */
private boolean newPluginImage(String name, String pluginId,
    String filename) {

  boolean success = true;
  ImageDescriptor id =
      AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, filename);

  if (id == null) {
    id = ImageDescriptor.getMissingImageDescriptor();
    // id = getSharedByName(ISharedImages.IMG_OBJS_ERROR_TSK);
    success = false;
  }

  descMap.put(name, id);
  imageMap.put(name, id.createImage(true));

  return success;
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:28,代码来源:ImageLibrary.java

示例8: TabDescriptor

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
/**
 * Constructor for TabDescriptor.
 * 
 * @param configurationElement
 *            the configuration element for the tab descriptor.
 */
public TabDescriptor(IConfigurationElement configurationElement) {
	super();
	if (configurationElement != null) {
		id = configurationElement.getAttribute(ATT_ID);
		label = configurationElement.getAttribute(ATT_LABEL);
		String imageString = configurationElement.getAttribute(ATT_IMAGE);
		if (imageString != null) {
			image = AbstractUIPlugin.imageDescriptorFromPlugin(
					configurationElement.getDeclaringExtension()
							.getNamespaceIdentifier(), imageString);
		}
		String indentedString = configurationElement.getAttribute(ATT_INDENTED);
		indented = indentedString != null && indentedString.equals("true"); //$NON-NLS-1$
		String scrollableString = configurationElement.getAttribute(ATT_SCROLLABLE);
		scrollable= scrollableString == null || scrollableString.toLowerCase().equals("true"); //$NON-NLS-1$
		category = configurationElement.getAttribute(ATT_CATEGORY);
		afterTab = configurationElement.getAttribute(ATT_AFTER_TAB);
		if (id == null || label == null || category == null) {
			// the tab id, label and category are mandatory - log error
			handleTabError(configurationElement, null);
		}
	}
	selected = false;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:31,代码来源:TabDescriptor.java

示例9: getImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
public static Image getImage(AbstractUIPlugin plugin, String path)
{
	ImageRegistry registry = plugin.getImageRegistry();
	Image image = registry.get(path);
	if (image == null)
	{
		ImageDescriptor id = getImageDescriptor(plugin.getBundle().getSymbolicName(), path);
		if (id == null)
		{
			return null;
		}
		registry.put(path, id);
		image = registry.get(path);
	}
	return image;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:17,代码来源:UIUtils.java

示例10: getImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
private static Image getImage(String bundleSymbolicName, String path, ImageDescriptor id)
{
	String computedName = bundleSymbolicName + path;
	Image image = JFaceResources.getImage(computedName);
	if (image != null)
	{
		return image;
	}

	if (id == null)
	{
		id = AbstractUIPlugin.imageDescriptorFromPlugin(bundleSymbolicName, path);
	}

	if (id != null)
	{
		JFaceResources.getImageRegistry().put(computedName, id);
		return JFaceResources.getImage(computedName);
	}
	return null;
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:22,代码来源:SWTUtils.java

示例11: init

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
@Override
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
	this.selection = currentSelection;

	setWindowTitle(NFARExportMessages.WizardTitle_export);
	setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(
			"org.eclipse.ui.ide", "$nl$/icons/full/wizban/exportzip_wiz.png"));//$NON-NLS-1$
	setNeedsProgressMonitor(true);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:10,代码来源:NFARExportWizard.java

示例12: getDialogSettings

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
@Override
protected final IDialogSettings getDialogSettings() {
	AbstractUIPlugin activator = getUIPlugin();
	if (activator == null) {
		return null;
	}
	return activator.getDialogSettings();
}
 
开发者ID:de-jcup,项目名称:eclipse-batch-editor,代码行数:9,代码来源:AbstractFilterableTreeQuickDialog.java

示例13: loadImage

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
/**
 * Loads image in Image Registry is not available in it
 *
 * @param pluginId
 *            : Id of the plugin containing thie image
 * @param imageFilePath
 *            : image File Path in plugin
 * @return Image if loaded
 */
private synchronized Image loadImage(String pluginId, String imageFilePath) {
	String id = pluginId + ":" + imageFilePath;
	Image image = Activator.getDefault().getImageRegistry().get(id);
	if (image != null)
		return image;
	ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imageFilePath);
	if (imageDescriptor != null) {
		image = imageDescriptor.createImage();
		Activator.getDefault().getImageRegistry().put(pluginId + ":" + imageFilePath, image);
	}
	return image;
}
 
开发者ID:awltech,项目名称:eclipse-asciidoctools,代码行数:22,代码来源:Activator.java

示例14: CSSNodeAction

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
public CSSNodeAction(
    final CommonStructureControl cssControl,
    final String text,
    final String toolTipText,
    final String iconPath) {
    super(cssControl);
    this.cssControl = cssControl;
    setText(text);
    if (toolTipText != null && toolTipText.length() > 0) {
        setToolTipText(toolTipText);
    }
    if (iconPath != null && iconPath.length() > 0) {
        setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(TFSCommonUIClientPlugin.PLUGIN_ID, iconPath));
    }
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:16,代码来源:CSSNodeAction.java

示例15: getImageDescriptor

import org.eclipse.ui.plugin.AbstractUIPlugin; //导入依赖的package包/类
public static ImageDescriptor getImageDescriptor(
    final IConfigurationElement configElement,
    final String attributeName,
    final String extensionPointName) {
    final String s = configElement.getAttribute(attributeName);
    if (s == null) {
        return null;
    }

    final String contributor = getContributorFor(configElement);

    return AbstractUIPlugin.imageDescriptorFromPlugin(contributor, s);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:14,代码来源:Utils.java


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