Java 类org.eclipse.ui.part.ViewPart 实例源码
项目:eavp
文件:AddVisitPlotAction.java
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public AddVisitPlotAction(ViewPart parent) {
viewer = parent;
// Set the action's tool tip text.
setToolTipText("Add a plot to the list");
// Set the action's image (the green plus button for adding).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path(
"icons" + System.getProperty("file.separator") + "add.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
return;
}
项目:eavp
文件:LaunchPythonScriptDialogAction.java
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public LaunchPythonScriptDialogAction(ViewPart parent) {
viewer = parent;
// Set the action's tool tip text.
setToolTipText("Execute a Python script");
// Set the action's image (the green plus button for adding).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path("icons"
+ System.getProperty("file.separator") + "launch.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
return;
}
项目:eavp
文件:DeleteFileAction.java
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public DeleteFileAction(ViewPart parent) {
viewer = parent;
// Set the action's tool tip text.
setToolTipText("Delete the selected file from the list");
// Set the action's image (the red x button).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path("icons"
+ System.getProperty("file.separator") + "delete_X.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
return;
}
项目:Pydev
文件:UIUtils.java
public static ViewPart getView(String viewId, boolean forceVisible) {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
try {
if (workbenchWindow == null) {
return null;
}
IWorkbenchPage page = workbenchWindow.getActivePage();
if (forceVisible) {
return (ViewPart) page.showView(viewId, null, IWorkbenchPage.VIEW_VISIBLE);
} else {
IViewReference viewReference = page.findViewReference(viewId);
if (viewReference != null) {
//if it's there, return it (but don't restore it if it's still not there).
//when made visible, it'll handle things properly later on.
return (ViewPart) viewReference.getView(false);
}
}
} catch (Exception e) {
Log.log(e);
}
return null;
}
项目:Pydev
文件:AbstractWorkbenchTestCase.java
protected IAction getPyUnitViewAction(ViewPart view, Class<?> class1) {
IAction action = null;
IContributionItem[] items = view.getViewSite().getActionBars().getToolBarManager().getItems();
for (IContributionItem iContributionItem : items) {
if (iContributionItem instanceof ActionContributionItem) {
ActionContributionItem item = (ActionContributionItem) iContributionItem;
IAction lAction = item.getAction();
if (class1.isInstance(lAction)) {
action = lAction;
}
}
}
if (action == null) {
fail("Could not find action of class: " + class1);
}
return action;
}
项目:http4e
文件:ExportAjaxJQueryAction.java
public ExportAjaxJQueryAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as JQuery script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JS)));
setText(" JQuery");
}
项目:http4e
文件:ExportJMeterAction.java
public ExportJMeterAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export tabs as JMeter script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JMETER)));
setText("Export all tabs as JMeter script");
}
项目:http4e
文件:ExportFlexAction.java
public ExportFlexAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Flex/ActionScript");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.FLEX)));
setText(" Flex/ActionScript");
}
项目:http4e
文件:ImportLiveHttpHeadersAction.java
public ImportLiveHttpHeadersAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Import Firefox LiveHTTP Headers");
// setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO)));
setText("Import Firefox LiveHTTP Headers");
}
项目:http4e
文件:ImportHTTP4eAction.java
public ImportHTTP4eAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Import HTTP4e script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO)));
setText("Import HTTP4e script");
}
项目:http4e
文件:ExportVbAction.java
public ExportVbAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Visual Basic");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.VB)));
setText(" Visual Basic");
}
项目:http4e
文件:ExportJavaHttp4Action.java
public ExportJavaHttp4Action( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Apache HttpComponents 4 script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JAVA)));
setText(" Apache HttpComponents 4");
}
项目:http4e
文件:HelpAboutAction.java
public HelpAboutAction( ViewPart view, String title) {
super();
this.view = view;
setText(title);
// setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreImages.HELP)));
// setDisabledImageDescriptor(PDEPluginImages.DESC_PLUGIN_OBJ);
setDescription(title);
setToolTipText(title);
}
项目:http4e
文件:PrintAction.java
public PrintAction( ViewPart view, String title) {
super();
this.view = view;
setText(title);
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.HELP)));
// setDisabledImageDescriptor(PDEPluginImages.DESC_PLUGIN_OBJ);
setDescription("Print Http Packet");
setToolTipText("Print Http Packet");
}
项目:http4e
文件:ConfigAction.java
public ConfigAction( ViewPart view, String title) {
super();
this.view = view;
setText(title);
setDescription(title);
setToolTipText(title);
}
项目:http4e
文件:ExportCocoaAction.java
public ExportCocoaAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Cocoa");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.OC)));
setText(" Cocoa");
}
项目:http4e
文件:ExportAjaxPrototypeAction.java
public ExportAjaxPrototypeAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Prototype script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JS)));
setText(" Prototype");
}
项目:http4e
文件:ExportPHPAction.java
public ExportPHPAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as PHP script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.PHP)));
setText(" PHP");
}
项目:http4e
文件:ExportJavaHttp3Action.java
public ExportJavaHttp3Action( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Apache HttpClient 3 script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JAVA)));
setText(" Apache HttpClient 3");
}
项目:http4e
文件:ExportHTTP4eAction.java
public ExportHTTP4eAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export tabs as HTTP4e script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO)));
setText("Export all tabs as HTTP4e script");
}
项目:http4e
文件:ExportAjaxJSAction.java
public ExportAjaxJSAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as JavaScript");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JS)));
setText(" JavaScript");
}
项目:http4e
文件:ExportPythonAction.java
public ExportPythonAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Python");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.PYTHON)));
setText(" Python");
}
项目:http4e
文件:ExportRubyAction.java
public ExportRubyAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Ruby");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.RUBY)));
setText(" Ruby");
}
项目:http4e
文件:ExportCsAction.java
public ExportCsAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as C# script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.CSHARP)));
setText(" C#");
}
项目:http4e
文件:ExportDialog.java
public ExportDialog( ViewPart view, String title, String titleMessage, String source) {
super(view.getViewSite().getShell());
setTitleImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO_DIALOG));
this.view = view;
this.title = title;
this.titleMessage = titleMessage;
this.source = source;
}
项目:eavp
文件:AddRemoteFileAction.java
/**
* The constructor
*
* @param parentView
* The ViewPart to whom the object of this class belongs.
* @param parentAction
* The AddFileAction to whom the object of this class belongs.
*/
public AddRemoteFileAction(ViewPart parentView,
AddFileAction parentAction) {
// Keep track of the viewer and parent Action containing this Action
viewer = parentView;
this.parentAction = parentAction;
// Set the display text
setText("Add a remote file");
}
项目:eavp
文件:AddTimeDependentSILOSetAction.java
/**
* The constructor
*
* @param parentView
* The ViewPart to whom the object of this class belongs.
* @param parentAction
* The AddFileAction to whom the object of this class belongs.
*/
public AddTimeDependentSILOSetAction(ViewPart parentView,
AddFileAction parentAction) {
// Keep track of the viewer and parent Action containing this Action
viewer = parentView;
this.parentAction = parentAction;
// Set the display text
setText("Add a SILO file set");
}
项目:eavp
文件:AddFileAction.java
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public AddFileAction(ViewPart parent) {
// Call the super class' constructor to create this action as a
// drop-down and declare this class as the menu creator
super(null, IAction.AS_DROP_DOWN_MENU);
setMenuCreator(this);
// Set the action's tool tip text.
setToolTipText("Open a file");
// Set the action's image (the green plus button for adding).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path("icons"
+ System.getProperty("file.separator") + "add.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
// Create the drop-down selections to add local files and remote files.
addActions = new ArrayList<Action>();
AddLocalFileAction addLocal = new AddLocalFileAction(parent, this);
addActions.add(addLocal);
AddRemoteFileAction addRemote = new AddRemoteFileAction(parent, this);
addActions.add(addRemote);
AddFileSetAction addSet = new AddFileSetAction(parent, this);
addActions.add(addSet);
AddTimeDependentSILOSetAction addSilo = new AddTimeDependentSILOSetAction(parent, this);
addActions.add(addSilo);
// Set the default Action to AddLocalFileAction
defaultAction = addLocal;
return;
}
项目:eavp
文件:AddLocalFileAction.java
/**
* The constructor
*
* @param parentView
* The ViewPart to whom the object of this class belongs.
* @param parentAction
* The AddFileAction to whom the object of this class belongs.
*/
public AddLocalFileAction(ViewPart parentView, AddFileAction parentAction) {
// Keep track of the viewer and parent Action containing this Action
viewer = parentView;
this.parentAction = parentAction;
// Set the display text
setText("Add a local file");
}
项目:eavp
文件:AddFileSetAction.java
/**
* The constructor
*
* @param parentView
* The ViewPart to whom the object of this class belongs.
* @param parentAction
* The AddFileAction to whom the object of this class belongs.
*/
public AddFileSetAction(ViewPart parentView, AddFileAction parentAction) {
// Keep track of the viewer and parent Action containing this Action
viewer = parentView;
this.parentAction = parentAction;
// Set the display text
setText("Add a file set");
}
项目:scouter
文件:ResourceUtils.java
static public void setVisiable(ViewPart viewPart, String ID, boolean enable){
IToolBarManager manager = viewPart.getViewSite().getActionBars().getToolBarManager();
final IContributionItem[] items = manager.getItems();
for (IContributionItem item : items) {
if (item.getId() != null && item.getId().equals(ID)){
item.setVisible(enable);
}
}
manager.update(true);
}
项目:SPELL
文件:ViewManager.java
@Override
public void setup()
{
IConfigurationManager cfg = (IConfigurationManager) ServiceManager.get(IConfigurationManager.class);
Logger.debug("Setting up", Level.INIT, this);
m_viewList = new TreeMap<String, ViewPart>();
m_procViewList = new TreeMap<String, IProcedureView>();
m_autoClose = cfg.getProperty(PropertyKey.AUTOMATIC_CLOSE);
GuiNotifications.get().addListener(this, IProcedureListener.class);
GuiNotifications.get().addListener(this, IProcedureModelListener.class);
cfg.addPropertyChangeListener(this);
}
项目:SPELL
文件:ViewManager.java
@Override
public ViewPart getView(String viewId) throws NoSuchViewException
{
if (!m_viewList.containsKey(viewId))
throw new NoSuchViewException("Unknown view: " + viewId);
return m_viewList.get(viewId);
}
项目:mytourbook
文件:MapManager.java
public static void fireSyncMapEvent(final MapPosition mapPosition,
final ViewPart viewPart,
final int positionFlags) {
final Object[] allListeners = _allMapSyncListener.getListeners();
for (final Object listener : allListeners) {
((IMapSyncListener) (listener)).syncMapWithOtherMap(mapPosition, viewPart, positionFlags);
}
}
项目:Archie-Smart-IDE
文件:SimpleImageRegistry.java
/*******************************************************
* This constructor should only be called from the createPartControl()
* method of the ViewPart class. It creates a simplified image registry that
* deals with all the internal setup and loading and storing images.
*
* @param owner
* The parent view part
* @param parent
* The parent control
*******************************************************/
public SimpleImageRegistry(ViewPart owner, Composite parent)
{
mOwner = owner;
// Get the default JFace resource manager
ResourceManager rm = JFaceResources.getResources();
// Create a local resource manager
LocalResourceManager lrm = new LocalResourceManager(rm, parent);
// Create the internal image registry
mImageRegistery = new ImageRegistry(lrm);
}
项目:team-explorer-everywhere
文件:TeamExplorerContext.java
public TeamExplorerContext(final ViewPart viewPart) {
this.viewPart = viewPart;
this.events = new TeamExplorerEvents();
ConnectHelpers.showHideViews(getSourceControlCapability());
}
项目:http4e
文件:ImportPacketAction.java
public ImportPacketAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Import raw HTTP packet");
setText("Import raw HTTP packet");
}
项目:http4e
文件:ToolsAction.java
public ToolsAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Http tools: Encoding, Encrypting ..");
setMenuCreator(this);
}
项目:http4e
文件:AuthDialog.java
public AuthDialog( ViewPart view) {
super(view.getViewSite().getShell());
setTitleImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO_DIALOG));
this.viewPart = view;
}
项目:http4e
文件:ExportMenuAction.java
public ExportMenuAction( ViewPart view) {
this.view = view;
menu = null;
setToolTipText("Export HTTP call to different languages");
setMenuCreator(this);
}