• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ServicesRegistry类的典型用法和代码示例

java 2次浏览

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

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

示例1: fireSelectionChanged

点赞 3

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
protected void fireSelectionChanged(ISelection selection) {
    super.fireSelectionChanged(selection);
    try {
        Optional<ServicesRegistry> servicesRegistry = Optional.ofNullable(editor)
                .map(IMultiDiagramEditor::getServicesRegistry);
        if (!servicesRegistry.isPresent()) {
            return;
        }

        Optional<EObject> selectedElement = Optional.of(selection).filter(IStructuredSelection.class::isInstance)
                .map(IStructuredSelection.class::cast).map(IStructuredSelection::getFirstElement)
                .filter(EObject.class::isInstance).map(EObject.class::cast);
        if (!selectedElement.isPresent()) {
            return;
        }

        NavigationService navigationService = servicesRegistry.get().getService(NavigationService.class);
        navigationService.navigate(selectedElement.get());

    } catch (ServiceException e) {
        LOGGER.warn("Could not acquire {}.", NavigationService.class, e);
    }
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:25,
代码来源:PapyrusContentOutlinePage.java

示例2: getNavigationTarget

点赞 3

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public NavigationTarget getNavigationTarget(ServicesRegistry registry) {
    IMultiDiagramEditor editor;
    try {
        editor = registry.getService(IMultiDiagramEditor.class);
        if (editor == null) {
            return null;
        }
    } catch (ServiceException ex) {
        // We're not in the context of the multi diagram editor. We have nothing to contribute.
        // Ignore the exception and do not do anything.
        return null;
    }

    IEditorPart activeEditor = editor.getActiveEditor();
    if (activeEditor instanceof SynchronizableGmfDiagramEditor) {
        return new EditorNavigationTarget((SynchronizableGmfDiagramEditor) activeEditor);
    }

    return null;
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:22,
代码来源:FixedActiveEditorNavigationTargetProvider.java

示例3: setUp

点赞 3

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Before
public void setUp(){
	IMultiDiagramEditor editor = Mockito.mock(IMultiDiagramEditor.class);

	ServicesRegistry reg = Mockito.mock(ServicesRegistry.class);
	this.ms = Mockito.mock(ModelSet.class);
	
	try {
		Mockito.when(reg.getService(ModelSet.class)).thenReturn(this.ms);
	} catch (ServiceException e) {
		e.printStackTrace();
	}
	
	this.editorPart = Mockito.mock(DiagramEditor.class);
	
	Mockito.when(editor.getServicesRegistry()).thenReturn(reg);
	Mockito.when(editor.getActiveEditor()).thenReturn(this.editorPart);
	
	this.diagramManager = new DiagramManager(editor);
}
 

开发者ID:ELTE-Soft,
项目名称:txtUML,
代码行数:21,
代码来源:DiagramManagerUnitTest.java

示例4: getThePIM

点赞 3

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private Package getThePIM(final ServicesRegistry servicesRegistry) {
    if (servicesRegistry == null) {
        return null;
    }
    final UmlModel theActiveModel = getUmlModel(servicesRegistry);
    if (theActiveModel == null) {
        return null;
    }
    final List<EObject> theModelContents = theActiveModel.getResource().getContents();
    if (theModelContents.isEmpty()) {
        return null;
    }
    for (final Package p : ((Model) theModelContents.get(0)).getNestedPackages()) {
        if (isPIM(p)) {
            return p;
        }
    }
    return null;
}
 

开发者ID:GRA-UML,
项目名称:tool,
代码行数:20,
代码来源:SubsetUpdater.java

示例5: askForServicesRegistry

点赞 3

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private ServicesRegistry askForServicesRegistry() {
    final ViewerFilter diagramFilter = new DiagramFilter();
    final IFile[] selectedFiles = openFileSelection(theShell,
            Activator.INSTANCE.getString("_UI_NIEM_SearchDoubleClickListener_prompt_select_model_title"),
            Activator.INSTANCE.getString("_UI_NIEM_SearchDoubleClickListener_prompt_select_model_message"), false, null,
            singletonList(diagramFilter));
    if (selectedFiles.length == 1) {
        try {
            final IEditorPart theEditor = page.openEditor(new FileEditorInput(selectedFiles[0]),
                    PapyrusMultiDiagramEditor.EDITOR_ID, true, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
            return (ServicesRegistry) theEditor.getAdapter(ServicesRegistry.class);
        } catch (final PartInitException e) {
            Activator.INSTANCE.log(e);
        }
    }
    return null;
}
 

开发者ID:GRA-UML,
项目名称:tool,
代码行数:18,
代码来源:SearchDoubleClickListener.java

示例6: listen

点赞 3

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private void listen(final IWorkbenchPartReference part, final ServicesRegistry servicesRegistry) {
    final SaveAndDirtyService saveAndDirtyService = getSaveAndDirtyService(servicesRegistry);
    final ModelSet theModelSet = getModelSet(servicesRegistry);
    final IEditorInputChangedListener changeListener = new ChangeListener(theModelSet);
    final ISaveEventListener aboutToSaveListener = new AboutToSaveListener(theModelSet);
    final ISaveEventListener saveListener = new SavingListener(theModelSet);
    final ISaveEventListener savedListener = new SavedListener(theModelSet);
    changeListeners.put(part, changeListener);
    aboutToSaveListeners.put(part, aboutToSaveListener);
    saveListeners.put(part, saveListener);
    savedListeners.put(part, savedListener);
    saveAndDirtyService.addInputChangedListener(changeListener);
    saveAndDirtyService.addAboutToDoSaveListener(aboutToSaveListener);
    saveAndDirtyService.addDoSaveListener(saveListener);
    saveAndDirtyService.addPostDoSaveListener(savedListener);
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:17,
代码来源:NIEMModelLifecycleRegistry.java

示例7: selectAppropriateModel

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private void selectAppropriateModel(IEditorPart editorPart) throws PartInitException {
    try {
        ServicesRegistry servicesRegistry = getServicesRegistery(editorPart);
        EObject rootObject = getConcreteSyntaxModel().getRootElement();
        CDOObject rootObjectCDO = CDOUtil.getCDOObject(rootObject);
        final CDOID rootObjectID = rootObjectCDO.cdoID();
        IPageManager pageManager = servicesRegistry.getService(IPageManager.class);
        Optional<CDOObject> pagedElement = pageManager.allPages().stream().filter(p -> p instanceof EObject)
                .map(p -> (EObject) p).map(CDOUtil::getCDOObject).filter(o -> rootObjectID.equals(o.cdoID()))
                .findFirst();

        if (pagedElement.isPresent()) {
            pageManager.closeOtherPages(pagedElement.get());
            rootObject = pagedElement.get();
        }

        // enforce loading of primitive types
        ResourceSet rs = rootObject.eResource().getResourceSet();
        if (rs != null) {
            rs.getResource(UML_PRIMITIVE_TYPES_URI, true);
        } else {
            LOGGER.warn("The element about to be selected is not contained in a resource set.");
        }

        OpenElementService openElementService = servicesRegistry.getService(OpenElementService.class);
        openElementService.openElement(rootObject);
    } catch (ServiceException e) {
        throw new PartInitException("Could not select the correct diagram.", e);
    }
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:31,
代码来源:PapyrusCDOLauncher.java

示例8: registerPostSaveListener

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private void registerPostSaveListener(IEditorPart editorPart) throws PartInitException {
    try {
        ServicesRegistry servicesRegistry = getServicesRegistery(editorPart);
        SaveEventListener saveListener = new SaveEventListener(this::handleEditorSave);
        servicesRegistry.getService(ILifeCycleEventsProvider.class).addPostDoSaveListener(saveListener);
    } catch (ServiceException e) {
        throw new PartInitException("Could not add save listener.", e);
    }
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:10,
代码来源:PapyrusCDOLauncher.java

示例9: getServicesRegistery

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private static ServicesRegistry getServicesRegistery(IEditorPart editorPart, boolean startOnDemand)
        throws ServiceException {
    ServicesRegistry servicesRegistry = editorPart.getAdapter(ServicesRegistry.class);
    if (servicesRegistry == null) {
        throw new ServiceException("Editor does not support service registry.");
    }
    if (startOnDemand) {
        servicesRegistry.startRegistry();
    }
    return servicesRegistry;
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:12,
代码来源:PapyrusCDOLauncher.java

示例10: openDiagram

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
/**
 * Opens the tab of diagram in the editor
 * @param diag - The diagram is to be opened
 */
public void openDiagram(Diagram diag){
	this.editor.getActiveEditor(); //Some kind of magic, but has to be done at least once before selecting different diagrams
	try{
		ServicesRegistry serviceRegistry = this.editor.getServicesRegistry();
		IPageManager pageMngr = ServiceUtils.getInstance().getIPageManager(serviceRegistry);
		pageMngr.selectPage(diag);
	}catch(ServiceException e){
		throw new RuntimeException(e);
	}
}
 

开发者ID:ELTE-Soft,
项目名称:txtUML,
代码行数:15,
代码来源:DiagramManager.java

示例11: initRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
/**
 * Initializes a registry
 * @param registry - The ServiceRegistry to be Initialized 
 */
private void initRegistry(ServicesRegistry registry){
	try {
		registry.startRegistry();
	} catch (ServiceException ex) {
		// Ignore this exception: some services may not have been loaded,
		// which is probably normal at this point
	}
	
	try{
		registry.getService(IPageManager.class);
	}catch (ServiceException e){
		throw new RuntimeException(e);
	}
}
 

开发者ID:ELTE-Soft,
项目名称:txtUML,
代码行数:19,
代码来源:PapyrusModelCreator.java

示例12: CreatesAPapyrusModel

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public CreatesAPapyrusModel(final Provider<ServicesRegistry> theServicesRegistry,
		final Provider<IProject> theProject, final String theModelName,
		final AbstractPapyrusGmfCreateDiagramCommandHandler... diagramCreationCommands) {
	this.theServicesRegistry = theServicesRegistry;
	this.theProject = theProject;
	this.theModelName = theModelName;
	this.diagramCreationCommands = asList(diagramCreationCommands);
}
 

开发者ID:timezra,
项目名称:UML-Testing-Tool,
代码行数:9,
代码来源:CreatesAPapyrusModel.java

示例13: SubsetUpdater

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public SubsetUpdater(final Shell theShell, final FontsAndColors theFontsAndColors,
        final ServicesRegistry theServicesRegistry, final Object theReferenceLibraryElement) {
    this.theShell = theShell;
    this.theFontsAndColors = theFontsAndColors;
    this.theServicesRegistry = theServicesRegistry;
    this.theReferenceLibraryElement = theReferenceLibraryElement;
}
 

开发者ID:GRA-UML,
项目名称:tool,
代码行数:8,
代码来源:SubsetUpdater.java

示例14: createAndOpenPapyrusModel

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private void createAndOpenPapyrusModel(final URI newURI, final BasicValues modelValues,
        final MPDValues modelMultiValues, final List<PointOfContact> pointsOfContact, final IProgressMonitor pm)
        throws ServiceException, IOException {
    final ServicesRegistry registry = createServicesRegistry();
    pm.worked(1);

    try {
        final ModelSet modelSet = registry.getService(ModelSet.class);

        createPapyrusModels(modelSet, newURI);
        pm.worked(1);

        initServicesRegistry(registry);
        pm.worked(1);

        initDomainModel(modelSet);
        pm.worked(1);

        setModelValues(modelSet, modelValues, modelMultiValues, pointsOfContact);
        pm.worked(1);

        initDiagramModel(modelSet, pm);
        pm.worked(1);

        openDiagram(newURI);
        pm.worked(1);
    } finally {
        disposeServicesRegistry(registry);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:31,
代码来源:NewNiemModelWizard.java

示例15: getTheEditingDomain

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public static TransactionalEditingDomain getTheEditingDomain(final ServicesRegistry servicesRegistry) {
    try {
        return servicesRegistry.getService(TransactionalEditingDomain.class);
    } catch (final ServiceException e) {
        throw new IllegalStateException(e);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:8,
代码来源:PapyrusExt.java

示例16: getThePageManager

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public static IPageManager getThePageManager(final ServicesRegistry servicesRegistry) {
    try {
        return servicesRegistry.getService(IPageManager.class);
    } catch (final ServiceException e) {
        throw new IllegalStateException(e);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:8,
代码来源:PapyrusExt.java

示例17: createServicesRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public static ServicesRegistry createServicesRegistry() throws ServiceException {
    final ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);

    exec(new Lambda() {
        @Override
        public void _() throws ServiceException {
            registry.startServicesByClassKeys(ModelSet.class);
        }
    });

    return registry;
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:13,
代码来源:PapyrusExt.java

示例18: initServicesRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public static void initServicesRegistry(final ServicesRegistry registry) throws ServiceException {
    exec(new Lambda() {
        @Override
        public void _() throws ServiceException {
            registry.startRegistry();
        }
    });
    registry.getService(IPageManager.class);
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:10,
代码来源:PapyrusExt.java

示例19: disposeServicesRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public static void disposeServicesRegistry(final ServicesRegistry registry) throws ServiceException {
    exec(new Lambda() {
        @Override
        public void _() throws ServiceException {
            registry.disposeRegistry();
        }
    });
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:9,
代码来源:PapyrusExt.java

示例20: partOpened

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public void partOpened(final IWorkbenchPartReference part) {
    if (canListenToLifecycle(part)) {
        final ServicesRegistry servicesRegistry = getServiceRegistry(part);
        opened(getModelSet(servicesRegistry));
        listen(part, servicesRegistry);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:9,
代码来源:NIEMModelLifecycleRegistry.java

示例21: unlisten

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private void unlisten(final IWorkbenchPartReference part, final ServicesRegistry servicesRegistry) {
    final SaveAndDirtyService saveAndDirtyService = getSaveAndDirtyService(servicesRegistry);
    saveAndDirtyService.removeInputChangedListener(changeListeners.remove(part));
    saveAndDirtyService.removeAboutToDoSaveListener(aboutToSaveListeners.remove(part));
    saveAndDirtyService.removeDoSaveListener(saveListeners.remove(part));
    saveAndDirtyService.removePostDoSaveListener(savedListeners.remove(part));
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:8,
代码来源:NIEMModelLifecycleRegistry.java

示例22: partClosed

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public void partClosed(final IWorkbenchPartReference part) {
    if (canListenToLifecycle(part)) {
        final ServicesRegistry servicesRegistry = getServiceRegistry(part);
        closed(getModelSet(servicesRegistry));
        unlisten(part, servicesRegistry);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:9,
代码来源:NIEMModelLifecycleRegistry.java

示例23: getSaveAndDirtyService

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private SaveAndDirtyService getSaveAndDirtyService(final ServicesRegistry servicesRegistry) {
    try {
        return (SaveAndDirtyService) servicesRegistry.getService(ISaveAndDirtyService.class);
    } catch (final ServiceException e) {
        throw new IllegalStateException("Unable to get the SaveAndDirtyService from the ServicesRegistry", e);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:8,
代码来源:NIEMModelLifecycleRegistry.java

示例24: getModelSet

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private ModelSet getModelSet(final ServicesRegistry servicesRegistry) {
    try {
        return servicesRegistry.getService(ModelSet.class);
    } catch (final ServiceException e) {
        throw new IllegalStateException("Unable to get the ModelSet from the ServiceRegistry.");
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:8,
代码来源:NIEMModelLifecycleRegistry.java

示例25: getSashWindowsContainer

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private ISashWindowsContainer getSashWindowsContainer(final ServicesRegistry servicesRegistry) {
    try {
        return servicesRegistry.getService(ISashWindowsContainer.class);
    } catch (final ServiceException e) {
        throw new IllegalStateException("Unable to get the ISashWindowsContainer from the ServicesRegistry", e);
    }
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:8,
代码来源:PaletteChangedListener.java

示例26: execute

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
    final IGraphicalEditPart theCurrentSelection = (IGraphicalEditPart) ((StructuredSelection) getCurrentSelectionChecked(event))
            .getFirstElement();
    final IFigure theFigure = theCurrentSelection.getFigure();
    final EObject theReferenceLibraryElement = findTheReferenceLibraryEquivalentOf(theCurrentSelection
            .resolveSemanticElement());
    new SubsetUpdater(getActiveShellChecked(event), new FontsAndColors(theFigure.getFont(),
            theFigure.getForegroundColor(), theFigure.getBackgroundColor()), (ServicesRegistry) getActiveEditorChecked(
                    event).getAdapter(ServicesRegistry.class), theReferenceLibraryElement).updateTheSubset();
    return null;
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:13,
代码来源:UpdateSubset.java

示例27: execute

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public final Object execute(final ExecutionEvent event) throws ExecutionException {
    final UMLNodeEditPart theCurrentSelection = (UMLNodeEditPart) ((StructuredSelection) getCurrentSelectionChecked(event))
            .getFirstElement();
    final ServicesRegistry theServicesRegistry = (ServicesRegistry) getActiveEditorChecked(event).getAdapter(
            ServicesRegistry.class);
    final TransactionalEditingDomain theEditingDomain = getTheEditingDomain(theServicesRegistry);

    final Command theCommand = getSetQualifiedNameDepthCommand(theEditingDomain, theCurrentSelection.getNotationView(),
            getDepth());

    theEditingDomain.getCommandStack().execute(theCommand);

    return null;
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:16,
代码来源:ShowName.java

示例28: init

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public void init(ServicesRegistry servicesRegistry) throws ServiceException {
    super.init(servicesRegistry);
    this.registry = servicesRegistry;
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:6,
代码来源:CooperateSaveLayoutBeforeCloseService.java

示例29: init

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public void init(ServicesRegistry servicesRegistry) throws ServiceException {
    super.init(servicesRegistry);
    this.serviceRegistry = servicesRegistry;
}
 

开发者ID:Cooperate-Project,
项目名称:CooperateModelingEnvironment,
代码行数:6,
代码来源:CooperateSaveAndDirtyService.java

示例30: get

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
@Override
public ServicesRegistry get() {
	return theServicesRegistry;
}
 

开发者ID:timezra,
项目名称:UML-Testing-Tool,
代码行数:5,
代码来源:CreatesAServicesRegistry.java

示例31: findTheServicesRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private ServicesRegistry findTheServicesRegistry() {
    final ServicesRegistry theServicesRegistry = getTheServicesRegistry();
    return theServicesRegistry == null ? askForServicesRegistry() : theServicesRegistry;
}
 

开发者ID:GRA-UML,
项目名称:tool,
代码行数:5,
代码来源:SearchDoubleClickListener.java

示例32: getTheServicesRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
public static ServicesRegistry getTheServicesRegistry() {
    final IEditorPart activeEditor = getActivePage().getActiveEditor();
    return (ServicesRegistry) (activeEditor == null ? null : activeEditor.getAdapter(ServicesRegistry.class));
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:5,
代码来源:PapyrusExt.java

示例33: getServiceRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
protected final ServicesRegistry getServiceRegistry(final IWorkbenchPartReference part) {
    return getServicesRegistry(part.getPart(true));
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:4,
代码来源:NIEMPartAdapter.java

示例34: getServicesRegistry

点赞 2

import org.eclipse.papyrus.infra.core.services.ServicesRegistry; //导入依赖的package包/类
private ServicesRegistry getServicesRegistry(final IAdaptable servicesRegistryAdapter) {
    return (ServicesRegistry) servicesRegistryAdapter.getAdapter(ServicesRegistry.class);
}
 

开发者ID:info-sharing-environment,
项目名称:NIEM-Modeling-Tool,
代码行数:4,
代码来源:NIEMPartAdapter.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)