@Override public void dispose() { JmsLogsPlugin.getDefault() .getPluginPreferences() .removePropertyChangeListener(propertyChangeListener); super.dispose(); }
public void init(IViewSite site) throws PartInitException { super.init(site); String secId = site.getSecondaryId(); if (secId != null) { serverId = Integer.parseInt(secId); } }
/* (non-Javadoc) * @see org.eclipse.ui.IViewPart#init(org.eclipse.ui.IViewSite, org.eclipse.ui.IMemento) */ public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site); Workbench workbench = (Workbench) site.getWorkbenchWindow().getWorkbench(); try { introPart = workbench.getWorkbenchIntroManager().createNewIntroPart(); // reset the part name of this view to be that of the intro title setPartName(introPart.getTitle()); introPart.addPropertyListener( new IPropertyListener() { public void propertyChanged(Object source, int propId) { firePropertyChange(propId); } }); introSite = new ViewIntroAdapterSite(site, workbench.getIntroDescriptor()); introPart.init(introSite, memento); } catch (CoreException e) { WorkbenchPlugin.log( IntroMessages.Intro_could_not_create_proxy, new Status( IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH, IStatus.ERROR, IntroMessages.Intro_could_not_create_proxy, e)); } }
@Override public void dispose() { stopTimer(); removeSelectionListener(); disposeGui(); super.dispose(); }
@Override public void dispose() { getSite().getPage().removePartListener(fPartListener); Enumeration<IMemoryViewPane> enumeration = fViewPanes.elements(); while (enumeration.hasMoreElements()) { Object element = enumeration.nextElement(); if (element instanceof IMemoryViewPane) { ((IMemoryViewPane) element).dispose(); } } fViewPaneControls.clear(); IViewSite viewSite = getViewSite(); String secondaryId = viewSite.getSecondaryId(); if (secondaryId != null) MemoryViewIdRegistry.deregisterView(secondaryId); fSyncService.shutdown(); if (fAddHandler != null) fAddHandler.dispose(); if (fToggleMonitorsHandler != null) fToggleMonitorsHandler.dispose(); if (fNextMemoryBlockHandler != null) fNextMemoryBlockHandler.dispose(); super.dispose(); }
@Override public void init(IViewSite site) throws PartInitException { super.init(site); fViewCnt++; String secondaryId = site.getSecondaryId(); if (secondaryId != null) MemoryViewIdRegistry.registerView(secondaryId); // only do this the first time // not sure if there is a bug in the UI... if the view is // not a primary view and if it's hidden, the view is not // init and created until it becomes visible. if (fViewCnt == 1) { // also try to find other views and register if (DebugUIPlugin.getActiveWorkbenchWindow() != null && DebugUIPlugin.getActiveWorkbenchWindow().getActivePage() != null) { IViewReference references[] = DebugUIPlugin.getActiveWorkbenchWindow().getActivePage().getViewReferences(); for (int i = 0; i < references.length; i++) { if (references[i].getSecondaryId() != null) { MemoryViewIdRegistry.registerView(references[i].getSecondaryId()); } } } } fSyncService = new MemoryViewSynchronizationService(); }
@Override public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); int detailsState = IFlyoutPreferences.STATE_OPEN; int patternsState = IFlyoutPreferences.STATE_COLLAPSED; if (memento != null) { if (memento.getInteger(DETAILS_VIEW_FLYOUT_STATE) != null) { detailsState = memento.getInteger(DETAILS_VIEW_FLYOUT_STATE); } if (memento.getInteger(PATTERNS_VIEWER_FLYOUT_STATE) != null) { patternsState = memento.getInteger(DETAILS_VIEW_FLYOUT_STATE); } if (memento.getString(PACKAGE_PRESENTATION_STATE) != null) { mementoPackagePresentation = memento.getString(PACKAGE_PRESENTATION_STATE); } } detailsViewerFlyoutPreferences = new FlyoutPreferences(IFlyoutPreferences.DOCK_EAST, detailsState, 300); patternsViewerFlyoutPreferences = new FlyoutPreferences(IFlyoutPreferences.DOCK_WEST, patternsState, 100); IncQueryGUIPlugin.getDefault() .getPreferenceStore() .setDefault(PreferenceConstants.WILDCARD_MODE, true); }
@Override public void dispose() { if (composite != null) { composite.dispose(); } super.dispose(); }
@Override public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); this.memento = memento; IWorkbenchSiteProgressService progressService = (IWorkbenchSiteProgressService) getViewSite().getAdapter(IWorkbenchSiteProgressService.class); if (progressService != null) { initProgressService(progressService); } getSite() .getPage() .addSelectionListener( new ISelectionListener() { @Override public void selectionChanged(IWorkbenchPart part, ISelection selection) { if (part != ProblemsView.this) { focusOn(part, selection); } } }); }
@Override public void init(final IViewSite site, final IMemento memento) throws PartInitException { super.init(site, memento); if (memento != null) { try { String dbpath = memento.getString(KEY_DB); String itempath = memento.getString(KEY_ITEM); if (dbpath != null && itempath != null) { ILocalMixedMediaDb mmdb; mmdb = Activator.getMediaFactory().getLocalMixedMediaDb(dbpath); mmdb.read(); IMediaPicture item = mmdb.getByFile(itempath); if (item != null) { setInput(mmdb, item); } else { // TODO something with this error. System.err.println("Failed to restore item '" + itempath + "' from '" + dbpath + "'."); } } } catch (Exception e) { new MorriganMsgDlg(e).open(); } Boolean b = memento.getBoolean(KEY_TIMER); if (b == null || b.booleanValue()) { // Default to true. startTimer(); } } }
/* * (non-Javadoc) * * @see org.eclipse.ui.part.WorkbenchPart#dispose() */ @Override public void dispose() { if (_listener != null) { TransactionManager.instance().removeTransactionManagerListener(_listener); } super.dispose(); }
/* * (non-Javadoc) * * @see org.eclipse.ui.part.ViewPart#init(org.eclipse.ui.IViewSite, * org.eclipse.ui.IMemento) */ @Override public void init(final IViewSite site, final IMemento memento) throws PartInitException { // let the parent do its bits super.init(site, memento); final Vector<String> pendingFilenames = new Vector<String>(); // are we showing the units column? if (memento != null) { final String scenFile = memento.getString(SCENARIO_FILE_INDEX); if (scenFile != null) { pendingFilenames.add(scenFile); } final String contFile = memento.getString(CONTROL_FILE_INDEX); if (contFile != null) { pendingFilenames.add(contFile); } // also, see if we have an auto-step size property final String stepSizeStr = memento.getString("StepInterval"); if (stepSizeStr != null) { // and store it. try { final Double duration = MWCXMLReader.readThisDouble(stepSizeStr); _myPendingStepSize = new Duration(duration, Duration.MILLISECONDS); } catch (final ParseException pe) { MWC.Utilities.Errors.Trace.trace(pe); } } } // did we receive any? if (pendingFilenames.size() > 0) _myPendingFilenames = pendingFilenames.toArray(new String[] {}); }
@Override public void dispose() { Activator.getDefault() .removeTapestryProjectListener(getViewSite().getWorkbenchWindow(), tapestryContextListener); super.dispose(); }
@Override public void dispose() { // store current settings back into preferences IPreferenceStore preferenceStore = AnalysisRCPActivator.getDefault().getPreferenceStore(); String pName = getPartName(); Integer setting = colourSettings.get(pName); if (setting != null) preferenceStore.setValue( pName + "." + PreferenceConstants.PLOT_VIEW_PLOT2D_COLOURMAP, setting); preferenceStore.setValue( pName + "." + PreferenceConstants.PLOT_VIEW_PLOT2D_SCALING, (useLog ? 1 : 0)); deleteIObservers(); if (histogramPlotter != null) histogramPlotter.cleanUp(); data = null; if (histogramUI != null) { histogramUI.deactivate(false); histogramUI.dispose(); } if (!cmbAlpha.isDisposed()) cmbAlpha.removeSelectionListener(this); if (!cmbRedColour.isDisposed()) cmbRedColour.removeSelectionListener(this); if (!cmbGreenColour.isDisposed()) cmbGreenColour.removeSelectionListener(this); if (!cmbBlueColour.isDisposed()) cmbBlueColour.removeSelectionListener(this); if (!btnGreenInverse.isDisposed()) btnGreenInverse.removeSelectionListener(this); if (!btnBlueInverse.isDisposed()) btnBlueInverse.removeSelectionListener(this); if (!btnAlphaInverse.isDisposed()) btnAlphaInverse.removeSelectionListener(this); if (!btnRedInverse.isDisposed()) btnRedInverse.removeSelectionListener(this); super.dispose(); }
public void dispose() { if (session != null && game != null) { session.closeGame(game); } background.dispose(); light.dispose(); dark.dispose(); quadWord.dispose(); tripleWord.dispose(); doubleWord.dispose(); quadLetter.dispose(); tripleLetter.dispose(); doubleLetter.dispose(); quadWordLight.dispose(); tripleWordLight.dispose(); doubleWordLight.dispose(); quadLetterLight.dispose(); tripleLetterLight.dispose(); doubleLetterLight.dispose(); tileDark.dispose(); textColor.dispose(); tileLight.dispose(); tileFill.dispose(); tileRackFill.dispose(); tileLightHighlight.dispose(); tileDarkHighlight.dispose(); coordinateColor.dispose(); coordinateFont.dispose(); arrowForeground.dispose(); arrowBackground.dispose(); tileRackBorder.dispose(); boardBorder.dispose(); super.dispose(); }
@Override public void dispose() { super.dispose(); if (this.thread != null) { this.thread.shutdown(); } }
@Override public void dispose() { getSite().getPage().removePartListener(trackRelevantEditorsPartListener); clearSWTXMLConnection(); clearPropertiesFileConnection(); super.dispose(); }
@Override public void dispose() { if (copyAction != null) { copyAction.dispose(); copyAction = null; } if (clipboard != null) { clipboard.dispose(); clipboard = null; } if (goToMarkerAction != null) { goToMarkerAction.dispose(); goToMarkerAction = null; } if (fontPropertyChangeListener != null) { JFaceResources.getFontRegistry().removeListener(fontPropertyChangeListener); fontPropertyChangeListener = null; } MarkersChangeService.getService().removeListener(this); super.dispose(); }
@Override public void dispose() { clockUpdater.setTerminated(true); super.dispose(); DebugUITools.getDebugContextManager().removeDebugContextListener(this); DebugPlugin.getDefault().removeDebugEventListener(this); font.dispose(); }
@Override public void dispose() { super.dispose(); for (IWorkbenchAction action : actionsToDispose) action.dispose(); ADDED.dispose(); DELETED.dispose(); SAME_CONTENT.dispose(); }
@Override public void dispose() { // on disposal remove the selection listener ISelectionService s = getSite().getWorkbenchWindow().getSelectionService(); s.removeSelectionListener(selectionListener); super.dispose(); }
@Override public void dispose() { /* * GlobalEvents.getInstance().removeSelectionListener(this); * cv.getConfigurer().getContentProvider().stopListening(); */ super.dispose(); }
@Override public void dispose() { defaultComponent.dispose(); for (ViewersMultiSandboxViewComponent c : additionalComponents) { c.dispose(); } getSite().getPage().removeSelectionListener(forwardRevealListener); super.dispose(); }
@Override public void dispose() { if (taskModel != null) { taskModel.dispose(); taskModel = null; } super.dispose(); }
public void dispose() { super.dispose(); if (ibuffer != null && ibuffer.isDisposed() == false) { ibuffer.dispose(); } if (this.thread != null) { this.thread.shutdown(); } }
@Override public void dispose() { toplevel.kill(); toplevel.dispose(); super.dispose(); if (this.equals(OcamlPlugin.getLastFocusedToplevelInstance())) OcamlPlugin.setLastFocusedToplevelInstance(null); }
@Override public void saveState(IMemento memento) { super.saveState(memento); memento.putInteger(DETAILS_VIEW_FLYOUT_STATE, detailsViewerFlyout.getPreferences().getState()); memento.putInteger( PATTERNS_VIEWER_FLYOUT_STATE, patternsViewerFlyout.getPreferences().getState()); memento.putString( PACKAGE_PRESENTATION_STATE, (patternsTreeViewer.getContentProvider() == flatCP) ? "flat" : "hierarchical"); }
@Override public Object execute(ExecutionEvent event) throws ExecutionException { if (HandlerUtil.getActivePartChecked(event) instanceof ViewPart) { ViewPart view = (ViewPart) HandlerUtil.getActivePartChecked(event); IWorkbenchPartSite myIWorkbenchPartSite = view.getSite(); ISelectionProvider selectionProvider = myIWorkbenchPartSite.getSelectionProvider(); if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection selection = (IStructuredSelection) selectionProvider.getSelection(); ArtifactClipboard clipboard = new ArtifactClipboard(view.getSite().getId()); Iterator<?> iterator = selection.iterator(); Object selectionObject = null; while (iterator.hasNext()) { Object object = iterator.next(); if (object instanceof IAdaptable) { selectionObject = ((IAdaptable) object).getAdapter(Branch.class); if (selectionObject == null) { selectionObject = ((IAdaptable) object).getAdapter(Artifact.class); } } else if (object instanceof Match) { selectionObject = ((Match) object).getElement(); } if (selectionObject instanceof Artifact) { ArtifactPasteConfiguration config = new ArtifactPasteConfiguration(); Operations.executeAsJob( new ArtifactPasteOperation( config, (Artifact) selectionObject, clipboard.getCopiedContents(), new ArtifactNameConflictHandler()), true); } } } } return null; }
@Override public void dispose() { super.dispose(); if (listener != null) DebugUITools.getDebugContextManager().removeDebugContextListener(listener); /* getState().removeListener(stateListener); */ if (selectionSynchronizer != null) { selectionSynchronizer.dispose(); } }
@Override public void dispose() { if (getActionGroup() != null) { getActionGroup().dispose(); } Workspace.getInstance().uninstallResourceListener(this); // ProjectBuilder.removePropertyChangeListener(this); super.dispose(); }