Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Integrating ModelExplorerView into a new Perspective
Integrating ModelExplorerView into a new Perspective [message #643267] Mon, 06 December 2010 10:31
lle is currently offline lleFriend
Messages: 1
Registered: December 2010
Junior Member
I am building a new perspective that will embeded papyrus ModelExplorerView.

References to the content to display are still stored in Papyrus .di file but I want te be able to specify on which file the ModelExpèlorer get the data without opening the MultiDiagramEditor.

I investigate how everything interact in order to setup this view.

I believe that I need to start a service registry probably like that

			ServicesRegistry servicesRegistry = new ExtensionServicesRegistry(Activator.PLUGIN_ID);


Then load the model
		// Start servicesRegistry
		IFile file = ((IFileEditorInput)input).getFile();
		try {
			// Start the ModelSet first, and load if from the specified File
			List<Class<?>> servicesToStart = new ArrayList<Class<?>>(1);
			servicesToStart.add(ModelSet.class);

			servicesRegistry.startServicesByClassKeys(servicesToStart);
			resourceSet = servicesRegistry.getService(ModelSet.class);
			resourceSet.loadModels(file);

			// start remaining services
			servicesRegistry.startRegistry();
		} catch (ModelMultiException e) {
			log.error(e);
			throw new PartInitException("errors in model", e);
		} catch (ServiceException e) {
			log.error(e);
			throw new PartInitException("could not initialize services", e);
		}



After I think I am not sure what I really need, It seem that the ModelExplorerView need a Content Provider and an Editing domain. How do I get those and how to I provide them to ModelExplorer view without opening any MultiDiagramEditor ?
Previous Topic:Dealing with editors.
Next Topic:EMF based validation in Papyrus.
Goto Forum:
  


Current Time: Thu Apr 25 20:12:40 GMT 2024

Powered by FUDForum. Page generated in 0.03149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top