本文整理汇总了Java中org.eclipse.jface.window.IShellProvider类的典型用法代码示例。如果您正苦于以下问题:Java IShellProvider类的具体用法?Java IShellProvider怎么用?Java IShellProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IShellProvider类属于org.eclipse.jface.window包,在下文中一共展示了IShellProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SaveIntersectionGraphmlAction
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public SaveIntersectionGraphmlAction(
final IShellProvider shellProvider,
final ILogger logger,
final IObjectListModel<IItem> selectedItems,
final IDependenciesModel dependenciesModel,
final IBooleanModel enableNormalizeGraphModel) {
this.shellProvider = shellProvider;
this.logger = logger;
this.selectedItems = selectedItems;
this.dependenciesModel = dependenciesModel;
this.enableNormalizeGraphModel = enableNormalizeGraphModel;
setToolTipText("Save projects intersection dependencies as graphml-file");
setImageDescriptor(PlatformUI
.getWorkbench()
.getSharedImages()
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
}
示例2: UpdateDependencyModelAction
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public UpdateDependencyModelAction(
final IShellProvider shellProvider,
final Canceler canceler,
final ILogger logger,
final IJavaModel model,
final IDependenciesModel dependenciesModel,
final INameHitMaps nameHitMaps) {
this.logger = logger;
this.nameHitMaps = nameHitMaps;
setToolTipText(TOOLTIP_TEXT);
setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD));
this.shellProvider = shellProvider;
this.canceler = canceler;
this.model = model;
this.dependenciesModel = dependenciesModel;
}
示例3: activate
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
/**
* Called by OSGi Declarative Services Runtime when the {@link GoogleLoginService} is activated
* as an OSGi service.
*/
protected void activate() {
final IWorkbench workbench = PlatformUI.getWorkbench();
LoginServiceLogger logger = new LoginServiceLogger();
IShellProvider shellProvider = new IShellProvider() {
@Override
public Shell getShell() {
return workbench.getDisplay().getActiveShell();
}
};
LoginServiceUi uiFacade = new LoginServiceUi(workbench, shellProvider, workbench.getDisplay());
OAuthDataStore dataStore =
new JavaPreferenceOAuthDataStore(PREFERENCE_PATH_OAUTH_DATA_STORE, logger);
loginState = new GoogleLoginState(
Constants.getOAuthClientId(), Constants.getOAuthClientSecret(), OAUTH_SCOPES,
dataStore, uiFacade, logger);
loginState.setApplicationName(CloudToolsInfo.USER_AGENT);
accounts = loginState.listAccounts();
}
示例4: openProject
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
/**
*
*
*
* @param projects void
*/
private void openProject(final IProject[] projects) {
IShellProvider shellProvider = new IShellProvider() {
public Shell getShell() {
return ResourceManager.this.getShell();
}
};
OpenResourceAction action = new OpenResourceAction(shellProvider){
protected List getSelectedResources() {
return Arrays.asList(projects);
}
};
action.run();
}
示例5: makeActions
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
protected void makeActions() {
clipboard = new Clipboard(shell.getDisplay());
pasteAction = new PasteAction(shell, clipboard);
pasteAction.setImageDescriptor(GamaIcons.create("menu.paste2").descriptor());
pasteAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
copyAction = new CopyAction(shell, clipboard, pasteAction);
copyAction.setImageDescriptor(GamaIcons.create("menu.copy2").descriptor());
copyAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
final IShellProvider sp = () -> shell;
deleteAction = new DeleteResourceAction(sp);
deleteAction.setImageDescriptor(GamaIcons.create("menu.delete2").descriptor());
deleteAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE);
}
示例6: ServiceMetadataDialog
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public ServiceMetadataDialog(IShellProvider parentShell, ServiceItem serviceItem, ServiceConnection serviceConnection) {
super(parentShell);
this.serviceItem = serviceItem;
this.serviceConnection = serviceConnection;
EMap<String, String> props = serviceConnection.getAdditionalInfo();
if (props != null) {
useSAM = Boolean.valueOf(props.get(USE_SAM));
useSL = Boolean.valueOf(props.get(USE_SL));
securitySAML = Boolean.valueOf(props.get(SECURITY_SAML));
securityBasic = Boolean.valueOf(props.get(SECURITY_BASIC));
authorization = Boolean.valueOf(props.get(AUTHORIZATION));
encryption = Boolean.valueOf(props.get(ENCRYPTION));
useServiceRegistry = Boolean.valueOf(props.get(USE_SERVICE_REGISTRY));
logMessages = Boolean.valueOf(props.get(LOG_MESSAGES));
wsdlSchemaValidation = Boolean.valueOf(props.get(WSDL_SCHEMA_VALIDATION));
useBusinessCorrelation = Boolean.valueOf(props.get(USE_BUSINESS_CORRELATION));
for (Map.Entry<String, String> prop : props.entrySet()) {
if (prop.getKey().startsWith(SL_CUSTOM_PROP_PREFIX)) {
slCustomProperties.put(prop.getKey().substring(SL_CUSTOM_PROP_PREFIX.length()),
prop.getValue());
}
}
}
}
示例7: SaveJarListAction
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public SaveJarListAction(
final IShellProvider shellProvider,
final ILogger logger,
final IDependenciesModel dependenciesModel) {
this.shellProvider = shellProvider;
this.logger = logger;
this.dependenciesModel = dependenciesModel;
setToolTipText("Save used libraries list");
setImageDescriptor(PlatformUI
.getWorkbench()
.getSharedImages()
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
}
示例8: SaveGraphmlAction
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public SaveGraphmlAction(
final IShellProvider shellProvider,
final ILogger logger,
final IDependenciesModel dependenciesModel,
final IBooleanModel enableNormalizeGraphModel) {
this.shellProvider = shellProvider;
this.logger = logger;
this.dependenciesModel = dependenciesModel;
this.enableNormalizeGraphModel = enableNormalizeGraphModel;
setToolTipText("Save project dependencies as graphml-file");
setImageDescriptor(PlatformUI
.getWorkbench()
.getSharedImages()
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
}
示例9: SaveNameHitMapsAction
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public SaveNameHitMapsAction(
final IShellProvider shellProvider,
final ILogger logger,
final INameHitMaps nameHitMaps) {
this.shellProvider = shellProvider;
this.logger = logger;
this.nameHitMaps = nameHitMaps;
setToolTipText("Save name hit maps");
setImageDescriptor(PlatformUI
.getWorkbench()
.getSharedImages()
.getImageDescriptor(ISharedImages.IMG_ETOOL_SAVE_EDIT));
}
示例10: getShellProvider
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
/**
* Retrieves a shell provider of currently active shell
*
* @return
*/
public static IShellProvider getShellProvider() {
return new IShellProvider() {
public Shell getShell() {
return UIHelper.getShell();
}
};
}
示例11: doSave
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
/**
* @see org.eclipse.ui.Saveable#doSave(org.eclipse.core.runtime.IProgressMonitor,
* org.eclipse.jface.window.IShellProvider)
*/
@Override
public synchronized IJobRunnable doSave(IProgressMonitor monitor, IShellProvider shellProvider) throws CoreException {
if (shellProvider instanceof IWorkbenchWindow) {
IWorkbenchWindow window = ((IWorkbenchWindow) shellProvider);
if (window.getWorkbench().isClosing()) {
DomainModelHandlerUtil.save();
} else {
return super.doSave(monitor, shellProvider);
}
}
return null;
}
示例12: makeActions
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
protected void makeActions() {
final IShellProvider sp = () -> shell;
renameAction = new RenameResourceAction(sp);
renameAction.setImageDescriptor(GamaIcons.create("navigator/navigator.rename2").descriptor());
renameAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_RENAME);
historyAction = new ShowLocalHistory(sp);
historyAction.setImageDescriptor(GamaIcons.create("navigator/navigator.date2").descriptor());
}
示例13: makeActions
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
protected void makeActions() {
final IShellProvider sp = () -> shell;
refreshAction = new RefreshAction(sp);
refreshAction.setImageDescriptor(GamaIcons.create("navigator/navigator.refresh2").descriptor());//$NON-NLS-1$
refreshAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH);
runAllTestsAction = new RunAllTestsAction(sp, "Run all tests");
runAllTestsAction.setImageDescriptor(GamaIcons.create("test.run2").descriptor());
}
示例14: createPropertyDialog
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public Dialog createPropertyDialog(Object element, IShellProvider shellProvider) throws CoreException
{
if (element != null)
{
return createPropertyDialog(element.getClass(), shellProvider);
}
return null;
}
示例15: init
import org.eclipse.jface.window.IShellProvider; //导入依赖的package包/类
public void init(final ICommonActionExtensionSite aSite) {
delegateSelectionProvider = new DelegateSelectionProvider( aSite.getViewSite().getSelectionProvider());
propertiesAction = new PropertyDialogAction(new IShellProvider() {
public Shell getShell() {
return aSite.getViewSite().getShell();
}
},delegateSelectionProvider);
propertiesAction.setText("属性");
propertiesAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);
}