Skip to content
Snippets Groups Projects
Commit ddb5c737 authored by Florian Hölzl's avatar Florian Hölzl
Browse files

YELLOW

refs 311
parent b5f37031
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Table; ...@@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.Table;
* @author ratiu * @author ratiu
* @author $Author: hoelzl $ * @author $Author: hoelzl $
* @version $Rev: 18709 $ * @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: 615F4C5D7DBBFB198EF23CA44E3D562C * @ConQAT.Rating YELLOW Hash: A0EBE838F6C48C637BF66BDCC7BECCF6
*/ */
public abstract class TableContentProviderBase implements public abstract class TableContentProviderBase implements
IStructuredContentProvider { IStructuredContentProvider {
...@@ -83,14 +83,7 @@ public abstract class TableContentProviderBase implements ...@@ -83,14 +83,7 @@ public abstract class TableContentProviderBase implements
// default implementation ignores the input changed event // default implementation ignores the input changed event
} }
/** /** ViewerSorter using {@link TableContentProviderBase#compare}. */
* ViewerSorter using {@link TableContentProviderBase#compare}
*
* @author hoelzlf
* @author $Author: hoelzlf $
* @version $Rev: 955 $
* @levd.rating RED Rev:
*/
private class TableViewerSorter extends ViewerSorter { private class TableViewerSorter extends ViewerSorter {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
......
...@@ -17,10 +17,10 @@ $Id$ ...@@ -17,10 +17,10 @@ $Id$
+--------------------------------------------------------------------------*/ +--------------------------------------------------------------------------*/
package org.fortiss.tooling.base.ui.databinding; package org.fortiss.tooling.base.ui.databinding;
import org.conqat.lib.commons.assertion.CCSMPre;
import org.eclipse.core.databinding.Binding; import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext; import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.observable.value.IObservableValue; import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnViewer; import org.eclipse.jface.viewers.ColumnViewer;
import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent; import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
...@@ -35,10 +35,10 @@ import org.fortiss.tooling.kernel.ui.util.DataBindingUtils; ...@@ -35,10 +35,10 @@ import org.fortiss.tooling.kernel.ui.util.DataBindingUtils;
/** /**
* Abstract base class for inline text cell editors using data binding. * Abstract base class for inline text cell editors using data binding.
* *
* @author hoelzlf * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating RED Hash: 383223FFB9C18CFC5E18AE6C875F2FDA * @ConQAT.Rating YELLOW Hash: 97B2B23D7EF5DA85AEF4EF792A1C394D
*/ */
public abstract class AbstractTextCellDatabindingEditingSupport extends public abstract class AbstractTextCellDatabindingEditingSupport extends
EditingSupport { EditingSupport {
...@@ -115,9 +115,7 @@ public abstract class AbstractTextCellDatabindingEditingSupport extends ...@@ -115,9 +115,7 @@ public abstract class AbstractTextCellDatabindingEditingSupport extends
this.cellEditor.setValue(""); this.cellEditor.setValue("");
bindings = createBinding(cellEditor, cell, this.cellEditor, dbc); bindings = createBinding(cellEditor, cell, this.cellEditor, dbc);
// TODO @review CD: don't we use Eclipse.core.runtime.Assert instead of Assert.isTrue(bindings != null && bindings.length > 0
// CCSMPre?
CCSMPre.isTrue(bindings != null && bindings.length > 0
&& bindings[0] != null, && bindings[0] != null,
"Illegal implementation: no binding returned."); "Illegal implementation: no binding returned.");
...@@ -172,7 +170,6 @@ public abstract class AbstractTextCellDatabindingEditingSupport extends ...@@ -172,7 +170,6 @@ public abstract class AbstractTextCellDatabindingEditingSupport extends
} }
bindings = null; bindings = null;
} }
getViewer().getColumnViewerEditor().removeEditorActivationListener( getViewer().getColumnViewerEditor().removeEditorActivationListener(
this); this);
} }
......
...@@ -102,7 +102,7 @@ import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils; ...@@ -102,7 +102,7 @@ import org.fortiss.tooling.kernel.ui.util.EObjectSelectionUtils;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating RED Hash: 2201EB7242C0D85A6E6D82A776246026 * @ConQAT.Rating YELLOW Hash: 29B690AA556FE2BDF57B347269A25E91
*/ */
public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T>
implements IPostSelectionProvider, ContextMenuContextProvider { implements IPostSelectionProvider, ContextMenuContextProvider {
...@@ -475,15 +475,13 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T> ...@@ -475,15 +475,13 @@ public class DiagramEditorBase<T extends EObject> extends GEFEditorBase<T>
* Highlights a figure by setting its color to be RED. This implementation * Highlights a figure by setting its color to be RED. This implementation
* can be changed by more specific editors. * can be changed by more specific editors.
*/ */
// TODO @review CD: unsafe code
// IMO double invocation of highlight(true) overwrites the normal color in
// the map and makes de-highlighting impossible
protected void setHighlight(IFigure fig, boolean highlighted) { protected void setHighlight(IFigure fig, boolean highlighted) {
if (highlighted) { if (highlighted) {
highlightedFigures2NormalColor.put(fig, fig.getForegroundColor()); if (!highlightedFigures2NormalColor.containsKey(fig)) {
fig.setForegroundColor(ColorConstants.red); highlightedFigures2NormalColor.put(fig,
fig.getForegroundColor());
fig.setForegroundColor(ColorConstants.red);
}
} else { } else {
Color normalColor = highlightedFigures2NormalColor.get(fig); Color normalColor = highlightedFigures2NormalColor.get(fig);
fig.setForegroundColor(normalColor); fig.setForegroundColor(normalColor);
......
...@@ -50,7 +50,7 @@ import org.fortiss.tooling.kernel.ui.service.IContextMenuService; ...@@ -50,7 +50,7 @@ import org.fortiss.tooling.kernel.ui.service.IContextMenuService;
* @author trachtenherz * @author trachtenherz
* @author $Author: hoelzl $ * @author $Author: hoelzl $
* @version $Rev: 18709 $ * @version $Rev: 18709 $
* @ConQAT.Rating YELLOW Hash: C9D77819956A4B95AC544B63F2BADF2A * @ConQAT.Rating GREEN Hash: 8573587F690FC94EF1300F9200C6793A
*/ */
public abstract class ContextMenuSubMenuContributorBase<T extends EObject> public abstract class ContextMenuSubMenuContributorBase<T extends EObject>
implements IContextMenuContributor { implements IContextMenuContributor {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment