Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-03-29 05:11:16 -0400
committerAlexander Kurtakov2018-03-29 05:11:16 -0400
commitdee6033014a25de5dd7d244aaed5f5545bc06e25 (patch)
treef5fc9ec5f619e11af5e227ede8302145d0054cdb /org.eclipse.ui.console
parent75e7022dee66c7b4698cb8d4be237b64c0abff2d (diff)
downloadeclipse.platform.debug-dee6033014a25de5dd7d244aaed5f5545bc06e25.tar.gz
eclipse.platform.debug-dee6033014a25de5dd7d244aaed5f5545bc06e25.tar.xz
eclipse.platform.debug-dee6033014a25de5dd7d244aaed5f5545bc06e25.zip
Bug 533051 - Use system cursors
So resources don't have to be created and disposed. Remove non-javadoc comments to ease reading. Change-Id: I69cc0c19bc61d12f46a1f2d035cda65c7eed41da Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java67
1 files changed, 2 insertions, 65 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
index 16ffa8053..9991f3519 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/TextConsoleViewer.java
@@ -381,11 +381,6 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
revealJob.schedule(50);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.custom.LineStyleListener#lineGetStyle(org.eclipse.swt.custom.LineStyleEvent)
- */
@Override
public void lineGetStyle(LineStyleEvent event) {
IDocument document = getDocument();
@@ -533,11 +528,6 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
return list.toArray(new Position[list.size()]);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.custom.LineBackgroundListener#lineGetBackground(org.eclipse.swt.custom.LineBackgroundEvent)
- */
@Override
public void lineGetBackground(LineBackgroundEvent event) {
event.lineBackground = null;
@@ -550,7 +540,7 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
*/
protected Cursor getHandCursor() {
if (handCursor == null) {
- handCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_HAND);
+ handCursor = ConsolePlugin.getStandardDisplay().getSystemCursor(SWT.CURSOR_HAND);
}
return handCursor;
}
@@ -562,7 +552,7 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
*/
protected Cursor getTextCursor() {
if (textCursor == null) {
- textCursor = new Cursor(ConsolePlugin.getStandardDisplay(), SWT.CURSOR_IBEAM);
+ textCursor = ConsolePlugin.getStandardDisplay().getSystemCursor(SWT.CURSOR_IBEAM);
}
return textCursor;
}
@@ -600,21 +590,11 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
control.removeMouseListener(this);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseTrackListener#mouseEnter(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseEnter(MouseEvent e) {
getTextWidget().addMouseMoveListener(this);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseTrackListener#mouseExit(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseExit(MouseEvent e) {
getTextWidget().removeMouseMoveListener(this);
@@ -623,20 +603,10 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseTrackListener#mouseHover(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseHover(MouseEvent e) {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseMoveListener#mouseMove(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseMove(MouseEvent e) {
Point p = new Point(e.x, e.y);
@@ -690,38 +660,18 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseDoubleClick(MouseEvent e) {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseListener#mouseDown(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseDown(MouseEvent e) {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.MouseListener#mouseUp(org.eclipse.swt.events.MouseEvent)
- */
@Override
public void mouseUp(MouseEvent e) {
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.TextViewer#createDocumentAdapter()
- */
@Override
protected IDocumentAdapter createDocumentAdapter() {
if (documentAdapter == null) {
@@ -763,11 +713,6 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.TextViewer#handleDispose()
- */
@Override
protected void handleDispose() {
IDocument document = getDocument();
@@ -781,14 +726,6 @@ public class TextConsoleViewer extends SourceViewer implements LineStyleListener
styledText.removeLineBackgroundListener(this);
styledText.removeMouseTrackListener(this);
- if(handCursor != null) {
- handCursor.dispose();
- }
- handCursor = null;
- if(textCursor != null) {
- textCursor.dispose();
- }
- textCursor = null;
hyperlink = null;
console = null;

Back to the top