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

GREEN

refs 862
parent e77f1f83
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,6 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
......@@ -67,12 +66,11 @@ import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
* @author doebber
* @author $Author$
* @version $Rev$
* @ConQAT.Rating GREEN Hash: DFB92C753036B87ACFD97D1EF0EE07D4
* @ConQAT.Rating GREEN Hash: CEB9B53DAD0F01E763EAB07D45284009
*/
@SuppressWarnings({"javadoc", "restriction"})
public class StyledTextActionHandler {
// TODO: remove the warnings
private DeleteActionHandler textDeleteAction = new DeleteActionHandler();
private CutActionHandler textCutAction = new CutActionHandler();
......@@ -113,18 +111,21 @@ public class StyledTextActionHandler {
private IActionBars actionBars;
private MouseAdapter mouseAdapter = new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
updateActionsEnableState();
}
};
private KeyAdapter keyAdapter = new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
updateActionsEnableState();
}
};
private class TextControlListener implements Listener {
@Override
public void handleEvent(Event event) {
switch(event.type) {
case SWT.Activate:
......@@ -149,6 +150,7 @@ public class StyledTextActionHandler {
this.actionHandler = actionHandler;
}
@Override
public void propertyChange(PropertyChangeEvent event) {
if(activeTextControl != null) {
return;
......@@ -169,6 +171,7 @@ public class StyledTextActionHandler {
.setHelp(this, IIDEHelpContextIds.TEXT_DELETE_ACTION);
}
@Override
public void runWithEvent(Event event) {
if(activeTextControl != null && !activeTextControl.isDisposed()) {
Point selection = activeTextControl.getSelection();
......@@ -213,6 +216,7 @@ public class StyledTextActionHandler {
.setHelp(this, IIDEHelpContextIds.TEXT_CUT_ACTION);
}
@Override
public void runWithEvent(Event event) {
if(activeTextControl != null && !activeTextControl.isDisposed()) {
activeTextControl.cut();
......@@ -251,6 +255,7 @@ public class StyledTextActionHandler {
.setHelp(this, IIDEHelpContextIds.TEXT_COPY_ACTION);
}
@Override
public void runWithEvent(Event event) {
if(activeTextControl != null && !activeTextControl.isDisposed()) {
activeTextControl.copy();
......@@ -288,6 +293,7 @@ public class StyledTextActionHandler {
.setHelp(this, IIDEHelpContextIds.TEXT_PASTE_ACTION);
}
@Override
public void runWithEvent(Event event) {
if(activeTextControl != null && !activeTextControl.isDisposed()) {
activeTextControl.paste();
......@@ -339,6 +345,7 @@ public class StyledTextActionHandler {
.setHelp(this, IIDEHelpContextIds.TEXT_SELECT_ALL_ACTION);
}
@Override
public void runWithEvent(Event event) {
if(activeTextControl != null && !activeTextControl.isDisposed()) {
activeTextControl.selectAll();
......
......@@ -29,7 +29,7 @@ import org.fortiss.tooling.kernel.ui.service.IModelElementHandlerService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 98B875BEB9A19FFC3F80D65FEF16AA3E
* @ConQAT.Rating GREEN Hash: 89DD3B369C5A0DCADCAE49B38A1EDDE2
*/
public class NavigatorTreeContentSorter extends ViewerSorter {
......
......@@ -25,7 +25,7 @@ import java.util.ArrayList;
* @author doebber
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: AF00628F490191DA5858C7B371E5B668
* @ConQAT.Rating GREEN Hash: F283A1E5270BD56E204D2B2041296002
*/
public class JavaUtils {
......@@ -42,5 +42,4 @@ public class JavaUtils {
}
return result;
}
}
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