Exemplo n.º 1
0
 protected void addListeners() {
   VirtualFileManager.getInstance().addVirtualFileManagerListener(myRefreshListener);
   SModelRepository.getInstance().addModelRepositoryListener(mySModelRepositoryListener);
   ModelAccess.instance().addCommandListener(myModelAccessListener);
   MPSModuleRepository.getInstance().addModuleRepositoryListener(myRepositoryListener);
   if (IMakeService.INSTANCE.isSessionActive()) {
     IMakeService.INSTANCE.get().addListener(myMakeNotificationListener);
   }
   ClassLoaderManager.getInstance().addReloadHandler(myReloadListener);
 }
Exemplo n.º 2
0
 protected void removeListeners() {
   ClassLoaderManager.getInstance().removeReloadHandler(myReloadListener);
   SModelRepository.getInstance().removeModelRepositoryListener(mySModelRepositoryListener);
   ModelAccess.instance().removeCommandListener(myModelAccessListener);
   MPSModuleRepository.getInstance().removeModuleRepositoryListener(myRepositoryListener);
   if (IMakeService.INSTANCE.hasMakeService()) {
     IMakeService.INSTANCE.get().removeListener(myMakeNotificationListener);
   }
   VirtualFileManager.getInstance().removeVirtualFileManagerListener(myRefreshListener);
 }
Exemplo n.º 3
0
 public void editNode(final SNode node, final IOperationContext context, final boolean focus) {
   ModelAccess.assertLegalWrite();
   NavigationSupport.getInstance()
       .openNode(context, node, focus, !(node.getModel() != null && node.getModel().isRoot(node)));
 }