Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-08-21 11:43:07 +0000
committerCamille Letavernier2014-08-21 13:50:25 +0000
commitdbc038b44bcbb890ae256d15eb09eb285512f020 (patch)
tree757e736583eea3ae352ad9ac91a81df7e59b79ff /plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline
parentea48a20561464c3cbb7895d430583669a9f82fcc (diff)
downloadorg.eclipse.papyrus-dbc038b44bcbb890ae256d15eb09eb285512f020.tar.gz
org.eclipse.papyrus-dbc038b44bcbb890ae256d15eb09eb285512f020.tar.xz
org.eclipse.papyrus-dbc038b44bcbb890ae256d15eb09eb285512f020.zip
[Code style] Apply clean-up and formatter on Main plug-ins
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramNavigator.java58
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOrientedContentProvider.java22
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOutline.java106
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Activator.java12
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Messages.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/overview/OverviewComposite.java31
6 files changed, 117 insertions, 114 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramNavigator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramNavigator.java
index ffdb29e723f..d9495142590 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramNavigator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramNavigator.java
@@ -1,16 +1,16 @@
/***********************************************************************
* Copyright (c) 2007, 2014 Anyware Technologies, Obeo, CEA, and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Anyware Technologies - initial API and implementation
- * Obeo
+ * Obeo
* Christian W. Damus (CEA) - bug 410346
- *
+ *
**********************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.outline;
@@ -49,9 +49,9 @@ import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
/**
* <b>Diagram navigator :</b><br>
* Display the content of the current diagram. <br>
- *
+ *
* Updated : 18 feb. 2008
- *
+ *
* @author <a href="mailto:david.sciamma@anyware-tech.com">David Sciamma</a>
* @author <a href="mailto:jacques.lescot@anyware-tech.com">Jacques LESCOT</a>
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
@@ -70,16 +70,16 @@ public class DiagramNavigator extends Composite {
/**
* This content provider filters the event from graphical object to only refresh when it's
* needed.
- *
+ *
* @author <a href="david.sciamma@anyware-tech.com">David Sciamma</a>
*/
protected class NavigatorAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
/**
* Constructor
- *
+ *
* @param adapterFactory
- * the factory
+ * the factory
*/
public NavigatorAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
@@ -90,12 +90,12 @@ public class DiagramNavigator extends Composite {
*/
@Override
public void notifyChanged(Notification notification) {
- if(notification instanceof IViewerNotification) {
- Object element = ((IViewerNotification)notification).getElement();
- if(!(element instanceof View)) {
+ if (notification instanceof IViewerNotification) {
+ Object element = ((IViewerNotification) notification).getElement();
+ if (!(element instanceof View)) {
// Filter only non-graphical object events
super.notifyChanged(notification);
- } else if((element instanceof Diagram) && ((IViewerNotification)notification).isLabelUpdate()) {
+ } else if ((element instanceof Diagram) && ((IViewerNotification) notification).isLabelUpdate()) {
// A diagram or a Diagrams is added or removed : refresh the
// whole tree
refreshViewer(true);
@@ -108,13 +108,13 @@ public class DiagramNavigator extends Composite {
/**
* Constructor
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param diagEditor
- * the viewer to edit as tree
+ * the viewer to edit as tree
* @param pageSite
- * the site
+ * the site
*/
public DiagramNavigator(Composite parent, IPageSite pageSite, ServicesRegistry registry) {
super(parent, SWT.BORDER);
@@ -128,7 +128,7 @@ public class DiagramNavigator extends Composite {
/**
* Returns the TreeViewer used as navigator
- *
+ *
* @return the navigable tree
*/
public TreeViewer getTreeViewer() {
@@ -141,9 +141,9 @@ public class DiagramNavigator extends Composite {
/**
* Create the contents of the widget
- *
+ *
* @param parent
- * the current widget
+ * the current widget
*/
protected void createContents(Composite parent) {
this.viewer = new TreeViewer(parent, SWT.MULTI);
@@ -162,8 +162,8 @@ public class DiagramNavigator extends Composite {
@Override
public void dispose() {
// Dispose the adapter factory because we created it
- if(adapterFactory instanceof IDisposable) {
- ((IDisposable)adapterFactory).dispose();
+ if (adapterFactory instanceof IDisposable) {
+ ((IDisposable) adapterFactory).dispose();
}
super.dispose();
}
@@ -188,13 +188,13 @@ public class DiagramNavigator extends Composite {
/**
* Refresh the tree viewer in the UI thread if we are in a different thread
- *
+ *
* @param updateLabel
- * <code>true</code> if the label must be refreshed
+ * <code>true</code> if the label must be refreshed
*/
protected final void refreshViewer(final boolean updateLabel) {
- if((viewer != null) && !viewer.getTree().isDisposed()) {
- if(Display.getCurrent() != Display.getDefault()) {
+ if ((viewer != null) && !viewer.getTree().isDisposed()) {
+ if (Display.getCurrent() != Display.getDefault()) {
syncRefreshViewer(updateLabel);
} else {
viewer.refresh(updateLabel);
@@ -204,9 +204,9 @@ public class DiagramNavigator extends Composite {
/**
* Refresh the tree viewer in the UI thread
- *
+ *
* @param updateLabel
- * <code>true</code> if the label must be refreshed
+ * <code>true</code> if the label must be refreshed
*/
private void syncRefreshViewer(final boolean updateLabel) {
viewer.getControl().getDisplay().syncExec(new Runnable() {
@@ -227,7 +227,7 @@ public class DiagramNavigator extends Composite {
/**
* Get the AdapterFactory associated with an editor
- *
+ *
* @return AdapterFactory
*/
protected AdapterFactory getAdapterFactory() {
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOrientedContentProvider.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOrientedContentProvider.java
index b59a8049cdf..d88b5e9029c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOrientedContentProvider.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOrientedContentProvider.java
@@ -1,15 +1,15 @@
/***********************************************************************
* Copyright (c) 2008, 2009 Anyware Technologies, Obeo
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Jacques Lescot (Anyware Technologies) - initial API and implementation
* Obeo
- *
+ *
**********************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.outline;
@@ -26,7 +26,7 @@ import org.eclipse.jface.viewers.Viewer;
/**
* Provide the content of the given diagram.
- *
+ *
* @author <a href="mailto:david.sciamma@anyware-tech.com">David Sciamma</a>
* @author <a href="mailto:jacques.lescot@anyware-tech.com">Jacques Lescot</a>
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
@@ -62,12 +62,12 @@ public class DiagramOrientedContentProvider implements ITreeContentProvider {
* {@inheritDoc}
*/
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof Diagram) {
- this.diagram = (Diagram)inputElement;
+ if (inputElement instanceof Diagram) {
+ this.diagram = (Diagram) inputElement;
List<Object> children = new ArrayList<Object>();
- for(Object object : diagram.getChildren()) {
- if(object instanceof View) {
- View view = (View)object;
+ for (Object object : diagram.getChildren()) {
+ if (object instanceof View) {
+ View view = (View) object;
EObject modelElement = ViewUtil.resolveSemanticElement(view);
if (modelElement != null)
{
@@ -92,8 +92,8 @@ public class DiagramOrientedContentProvider implements ITreeContentProvider {
*/
public Object getParent(Object element) {
// The parent of a diagram is the model object that contains it.
- if(element instanceof Diagram) {
- return ((Diagram)element).getElement();
+ if (element instanceof Diagram) {
+ return ((Diagram) element).getElement();
}
return null;
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOutline.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOutline.java
index dfe7cebb9b1..697414a04eb 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOutline.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/DiagramOutline.java
@@ -1,6 +1,6 @@
/***********************************************************************
* Copyright (c) 2008, 2014 Anyware Technologies, Obeo, CEA LIST, and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -52,14 +52,14 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* An outline in order to navigate in current diagram.
- *
+ *
* @author <a href="mailto:david.sciamma@anyware-tech.com">David Sciamma</a>
* @author <a href="mailto:jacques.lescot@anyware-tech.com">Jacques Lescot</a>
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
* @author <a href="mailto:yann.tanguy@cea.fr">Yann Tanguy</a>
*/
-//FIXME: The outline is broken in Eclipse 4.2. #createControl(Composite) is never called.
-//See #refresh()
+// FIXME: The outline is broken in Eclipse 4.2. #createControl(Composite) is never called.
+// See #refresh()
public class DiagramOutline extends Page implements IPapyrusContentOutlinePage, ISelectionListener, IAdaptable {
private final class ShowAllAction extends Action {
@@ -70,7 +70,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
@Override
public void run() {
- if(sashComp != null && !sashComp.isDisposed()) {
+ if (sashComp != null && !sashComp.isDisposed()) {
performShowAction();
}
}
@@ -84,7 +84,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
@Override
public void run() {
- if(overview != null && !overview.isDisposed()) {
+ if (overview != null && !overview.isDisposed()) {
performShowAction();
}
}
@@ -98,7 +98,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
@Override
public void run() {
- if(navigator != null && !navigator.isDisposed()) {
+ if (navigator != null && !navigator.isDisposed()) {
performShowAction();
}
}
@@ -159,8 +159,8 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
/**
* {@inheritDoc}
*/
- //FIXME: In Eclipse 4.2, this method is never called. This results in sashComp being null,
- //and a NPE being thrown after each selectionChangedEvent
+ // FIXME: In Eclipse 4.2, this method is never called. This results in sashComp being null,
+ // and a NPE being thrown after each selectionChangedEvent
@Override
public void createControl(Composite parent) {
@@ -172,20 +172,20 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
refreshSelection();
// Create Overview
- if(root != null) {
+ if (root != null) {
overview = createOverview(sashComp, root);
overview.setLayoutData(new GridData(GridData.FILL_BOTH));
}
// Create Navigator
navigator = createNavigator(sashComp, getSite());
- if(diagram != null) {
+ if (diagram != null) {
navigator.getTreeViewer().setInput(diagram);
}
// Slip SashForm in two sections
- if(overview != null) {
- sashComp.setWeights(new int[]{ 30, 70 });
+ if (overview != null) {
+ sashComp.setWeights(new int[] { 30, 70 });
}
createActions();
@@ -193,11 +193,11 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
/**
* Create the composite that shows an overview of the model
- *
+ *
* @param parent
- * the parent
+ * the parent
* @param rootEditPart
- * the root edit part
+ * the root edit part
* @return the overview composite
*/
protected Composite createOverview(Composite parent, ScalableFreeformRootEditPart rootEditPart) {
@@ -215,9 +215,9 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
/**
* Create the show outline actions in the given tool bar manager.
- *
+ *
* @param tbm
- * the outline tool bar manager
+ * the outline tool bar manager
*/
private void createShowOutlineActions(IToolBarManager tbm) {
// Show Tree action
@@ -261,7 +261,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
}
public void addSelectionChangedListener(ISelectionChangedListener listener) {
- if(navigator != null && !navigator.isDisposed()) {
+ if (navigator != null && !navigator.isDisposed()) {
navigator.getTreeViewer().addSelectionChangedListener(listener);
}
}
@@ -271,7 +271,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
}
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- if(navigator != null && !navigator.isDisposed()) {
+ if (navigator != null && !navigator.isDisposed()) {
navigator.getTreeViewer().removeSelectionChangedListener(listener);
}
}
@@ -284,33 +284,33 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
public void dispose() {
super.dispose();
// Navigator, overview... can be null
- if(navigator != null) {
+ if (navigator != null) {
navigator.dispose();
navigator = null;
}
- if(overview != null) {
+ if (overview != null) {
overview.dispose();
overview = null;
}
- if(multiEditor != null) {
+ if (multiEditor != null) {
// Remove selection change listener
multiEditor.getSite().getPage().removePostSelectionListener(this);
multiEditor = null;
}
IToolBarManager toolBarManager = getSite().getActionBars().getToolBarManager();
- if(showTreeItem != null) {
+ if (showTreeItem != null) {
showTreeItem.dispose();
showTreeItem = null;
}
- if(showOverviewItem != null) {
+ if (showOverviewItem != null) {
showOverviewItem.dispose();
showOverviewItem = null;
}
- if(showAllItem != null) {
+ if (showAllItem != null) {
showAllItem.dispose();
showAllItem = null;
}
@@ -330,7 +330,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
// Refresh outline contents content with the new selection
try {
- refresh(); //When outline breaks, the selectionChangeEvent is borken too. It may prevent the others views from receiving it...
+ refresh(); // When outline breaks, the selectionChangeEvent is borken too. It may prevent the others views from receiving it...
} catch (Exception ex) {
Activator.log.error(ex);
}
@@ -341,9 +341,9 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
*/
private void refreshSelection() {
- if(multiEditor.getActiveEditor() != null) {
- GraphicalViewer viewer = (GraphicalViewer)multiEditor.getAdapter(GraphicalViewer.class);
- if(viewer == null) { // In case of an editor that is not GEF based.
+ if (multiEditor.getActiveEditor() != null) {
+ GraphicalViewer viewer = (GraphicalViewer) multiEditor.getAdapter(GraphicalViewer.class);
+ if (viewer == null) { // In case of an editor that is not GEF based.
root = null;
diagram = null;
return;
@@ -351,10 +351,10 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
RootEditPart rootEditPart = viewer.getRootEditPart();
- if(rootEditPart instanceof RenderedDiagramRootEditPart) {
- root = (RenderedDiagramRootEditPart)rootEditPart;
- if(rootEditPart.getContents() != null) {
- diagram = (Diagram)rootEditPart.getContents().getModel();
+ if (rootEditPart instanceof RenderedDiagramRootEditPart) {
+ root = (RenderedDiagramRootEditPart) rootEditPart;
+ if (rootEditPart.getContents() != null) {
+ diagram = (Diagram) rootEditPart.getContents().getModel();
} else {
diagram = null;
}
@@ -373,34 +373,34 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
/**
* Refresh the outline view
*/
- //FIXME: Sometimes, this method is called before #createControl(), which results in a NPE with sashComp
- //Temporary fix : A non-null test has been added to avoid breaking the view
+ // FIXME: Sometimes, this method is called before #createControl(), which results in a NPE with sashComp
+ // Temporary fix : A non-null test has been added to avoid breaking the view
private void refresh() {
// Trash and re-Create Overview
- if((overview != null) && !(overview.isDisposed())) {
+ if ((overview != null) && !(overview.isDisposed())) {
overview.dispose();
}
- //If the view hasn't been created for any reason, we shouldn't do anything.
- //However, this is still a (minor) problem.
- if(sashComp == null) {
+ // If the view hasn't been created for any reason, we shouldn't do anything.
+ // However, this is still a (minor) problem.
+ if (sashComp == null) {
Activator.log.warn("Trying to refresh the Outline view before it is initialized");
return;
}
- if(root != null) {
+ if (root != null) {
overview = createOverview(sashComp, root);
overview.setLayoutData(new GridData(GridData.FILL_BOTH));
}
// Update navigator content
- if(diagram != null) {
+ if (diagram != null) {
navigator.getTreeViewer().setInput(diagram);
}
// Slip SashForm in two sections
- if((overview != null) && !(overview.isDisposed())) {
- sashComp.setWeights(new int[]{ 30, 70 });
+ if ((overview != null) && !(overview.isDisposed())) {
+ sashComp.setWeights(new int[] { 30, 70 });
}
// Refresh outline without changing mode
@@ -415,7 +415,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
// Select the kind of outline to show content
Control control = null;
control = null;
- switch(getShowActionMode()) {
+ switch (getShowActionMode()) {
case SHOW_TREE:
control = navigator;
break;
@@ -430,26 +430,26 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
}
// Update outline view
- if(sashComp != null && !sashComp.isDisposed()) {
+ if (sashComp != null && !sashComp.isDisposed()) {
sashComp.setMaximizedControl(control);
}
}
/**
* Get current contents representation of the outline
- *
+ *
* @return current Outline show mode
*/
private int getShowActionMode() {
int showActionMode = -1;
- if(showTreeItem.getAction().isChecked()) {
+ if (showTreeItem.getAction().isChecked()) {
showActionMode = SHOW_TREE;
}
- if(showOverviewItem.getAction().isChecked()) {
+ if (showOverviewItem.getAction().isChecked()) {
showActionMode = SHOW_OVERVIEW;
}
- if(showAllItem.getAction().isChecked()) {
+ if (showAllItem.getAction().isChecked()) {
showActionMode = SHOW_BOTH;
}
@@ -457,7 +457,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
}
private void setShowActionMode(int showAction) {
- switch(showAction) {
+ switch (showAction) {
case SHOW_TREE:
showTreeItem.getAction().setChecked(true);
break;
@@ -475,7 +475,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
}
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
- if(adapter == IReloadContextProvider.class) {
+ if (adapter == IReloadContextProvider.class) {
return new IReloadContextProvider() {
public Object createReloadContext() {
@@ -483,7 +483,7 @@ public class DiagramOutline extends Page implements IPapyrusContentOutlinePage,
}
public void restore(Object reloadContext) {
- ((ReloadContext)reloadContext).restore(DiagramOutline.this);
+ ((ReloadContext) reloadContext).restore(DiagramOutline.this);
}
};
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Activator.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Activator.java
index 7cae0f8f60f..4c1e409cd94 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Activator.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Activator.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
@@ -22,7 +22,7 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
- *
+ *
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
*/
public class Activator extends AbstractUIPlugin {
@@ -66,7 +66,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
@@ -75,16 +75,16 @@ public class Activator extends AbstractUIPlugin {
/**
* get the image desciptor from a string path
- *
+ *
* @param pathString
- * path of the image
+ * path of the image
* @return the image descriptor
*/
public static ImageDescriptor getImageDescriptor(String pathString) {
IPath path = new Path(pathString);
URL uri = FileLocator.find(Activator.plugin.getBundle(), path, null);
- if(uri == null) {
+ if (uri == null) {
return null;
}
return ImageDescriptor.createFromURL(uri);
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Messages.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Messages.java
index 45f928a2836..c83cbd40b82 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Messages.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/internal/Messages.java
@@ -4,7 +4,7 @@
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/overview/OverviewComposite.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/overview/OverviewComposite.java
index 0c6d3f63d10..6c3bb2ba9a7 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/overview/OverviewComposite.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline/src/org/eclipse/papyrus/infra/gmfdiag/outline/overview/OverviewComposite.java
@@ -1,15 +1,15 @@
/***********************************************************************
* Copyright (c) 2007, 2008, 2009 Anyware Technologies, Obeo
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Anyware Technologies - initial API and implementation
* Obeo
- *
+ *
**********************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.outline.overview;
@@ -28,7 +28,7 @@ import org.eclipse.swt.widgets.Control;
/**
* This class is an outline control showing an overview of a graphical editor. <br>
- *
+ *
* @author <a href="mailto:david.sciamma@anyware-tech.com">David Sciamma </a>
* @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
*/
@@ -45,11 +45,11 @@ public class OverviewComposite extends Composite {
/**
* Creates a new OverviewOutlinePage instance.
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
* @param rootEditPart
- * the root edit part
+ * the root edit part
*/
public OverviewComposite(Composite parent, ScalableFreeformRootEditPart rootEditPart) {
super(parent, SWT.BORDER);
@@ -67,9 +67,9 @@ public class OverviewComposite extends Composite {
/**
* Creates the inner controls
- *
+ *
* @param parent
- * the parent composite
+ * the parent composite
*/
public void createControl(Composite parent) {
// An swt canvas and lws drawing the figure.
@@ -79,7 +79,7 @@ public class OverviewComposite extends Composite {
LightweightSystem lightweightSystem = new LightweightSystem(overview);
// create the thumbnail
- thumbnail = new ScrollableThumbnail((Viewport)rootEditPart.getFigure());
+ thumbnail = new ScrollableThumbnail((Viewport) rootEditPart.getFigure());
thumbnail.setBorder(new MarginBorder(3));
thumbnail.setSource(rootEditPart.getLayer(LayerConstants.PRINTABLE_LAYERS/* SCALABLE_LAYERS */));
lightweightSystem.setContents(thumbnail);
@@ -89,8 +89,9 @@ public class OverviewComposite extends Composite {
/**
* {@inheritDoc}
*/
+ @Override
public void dispose() {
- if(null != thumbnail) {
+ if (null != thumbnail) {
thumbnail.deactivate();
thumbnail = null;
}
@@ -101,6 +102,7 @@ public class OverviewComposite extends Composite {
/**
* {@inheritDoc}
*/
+ @Override
public void setVisible(boolean state) {
thumbnail.setVisible(state);
super.setVisible(state);
@@ -108,7 +110,7 @@ public class OverviewComposite extends Composite {
/**
* {@inheritDoc}
- *
+ *
* @return the main control
*/
public Control getControl() {
@@ -117,11 +119,12 @@ public class OverviewComposite extends Composite {
/**
* {@inheritDoc}
- *
+ *
* @return <code>true</code> if the focus succeed
*/
+ @Override
public boolean setFocus() {
- if(getControl() != null) {
+ if (getControl() != null) {
return getControl().setFocus();
}
return false;

Back to the top