Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-08-15 20:19:50 +0000
committerPaul Pazderski2019-08-15 20:20:05 +0000
commit005b52cdfeffd7d41b4ef262664ff07d4313f9ff (patch)
tree16535d0d7e4c283cb2f0681806f53b1f4e540496
parenta71b89989d8cfb96d2c4d9539f12ee0f3d47adc9 (diff)
downloadeclipse.platform.debug-005b52cdfeffd7d41b4ef262664ff07d4313f9ff.tar.gz
eclipse.platform.debug-005b52cdfeffd7d41b4ef262664ff07d4313f9ff.tar.xz
eclipse.platform.debug-005b52cdfeffd7d41b4ef262664ff07d4313f9ff.zip
Change-Id: I6dc01c6b296d3d93648012cbbca0175100d75fcb Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java29
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java1
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java7
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java16
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java34
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java6
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java4
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java4
9 files changed, 75 insertions, 30 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
index b43b47544..f55935e5b 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/ConsolePlugin.java
@@ -56,6 +56,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Returns the singleton instance of the console plug-in.
+ *
+ * @return the singleton instance of this console plug-in
*/
public static ConsolePlugin getDefault() {
return fgPlugin;
@@ -68,6 +70,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Convenience method which returns the unique identifier of this plug-in.
+ *
+ * @return this plug-in's unique identifier
*/
public static String getUniqueIdentifier() {
return PI_UI_CONSOLE;
@@ -120,6 +124,8 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Returns the workbench display.
+ *
+ * @return the workbench display
*/
public static Display getStandardDisplay() {
return PlatformUI.getWorkbench().getDisplay();
@@ -127,6 +133,11 @@ public class ConsolePlugin extends AbstractUIPlugin {
/**
* Utility method with conventions
+ *
+ * @param shell the parent shell for the dialog
+ * @param title dialog title
+ * @param message dialog message
+ * @param t error to show in dialog
*/
public static void errorDialog(Shell shell, String title, String message, Throwable t) {
IStatus status;
@@ -146,11 +157,12 @@ public class ConsolePlugin extends AbstractUIPlugin {
}
/**
- * Returns the <code>Image</code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
*
- * @return the <code>Image</code> identified by the given key,
- * or <code>null</code> if it does not exist
+ * @param key the image's key
+ * @return the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist
* @since 3.1
*/
public static Image getImage(String key) {
@@ -158,11 +170,12 @@ public class ConsolePlugin extends AbstractUIPlugin {
}
/**
- * Returns the <code>ImageDescriptor</code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
*
- * @return the <code>ImageDescriptor</code> identified by the given key,
- * or <code>null</code> if it does not exist
+ * @param key the image's key
+ * @return the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist
* @since 3.1
*/
public static ImageDescriptor getImageDescriptor(String key) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
index dd1a505fb..2faaa3692 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java
@@ -79,6 +79,7 @@ public class IOConsoleOutputStream extends OutputStream {
* Constructs a new output stream on the given console.
*
* @param console I/O console
+ * @param charset the encoding used to write to console
*/
IOConsoleOutputStream(IOConsole console, Charset charset) {
this.decoder = new StreamDecoder(charset);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
index da454eb61..be35b2304 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/MessageConsoleStream.java
@@ -43,7 +43,8 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
private MessageConsole fMessageConsole;
/**
- * Constructs a new stream connected to the given console.
+ * Constructs a new stream connected to the given console with workbench default
+ * encoding.
*
* @param console the console to write messages to
*/
@@ -55,6 +56,7 @@ public class MessageConsoleStream extends IOConsoleOutputStream {
* Constructs a new stream connected to the given console.
*
* @param console the console to write messages to
+ * @param charset encoding used to write to console
* @since 3.7
*/
public MessageConsoleStream(MessageConsole console, Charset charset) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
index 6b5fb10fa..00c747e17 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/actions/TextViewerGotoLineAction.java
@@ -64,7 +64,10 @@ public class TextViewerGotoLineAction extends TextViewerAction {
protected ITextViewer fTextViewer;
/**
- * Constructs a goto line action for the viewer using the provided resource bundle
+ * Constructs a goto line action for the viewer using the provided resource
+ * bundle.
+ *
+ * @param viewer the viewer to jump in
*/
public TextViewerGotoLineAction(ITextViewer viewer) {
super(viewer, -1);
@@ -83,6 +86,8 @@ public class TextViewerGotoLineAction extends TextViewerAction {
/**
* Jumps to the line.
+ *
+ * @param line the target line. First line is line <code>0</code>.
*/
protected void gotoLine(int line) {
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
index 7c27120ae..59ea1d431 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
@@ -338,16 +338,20 @@ public class ConsoleManager implements IConsoleManager {
}
/**
- * Returns whether the given console view should be brought to the top.
- * The view should not be brought to the top if the view is pinned on
- * a console other than the given console.
+ * Returns whether the given console view should be brought to the top. The view
+ * should not be brought to the top if the view is pinned on a console other
+ * than the given console.
+ *
+ * @param console the console to be shown in the view
+ * @param consoleView the view which should be brought to the top
+ * @return whether the given console view should be brought to the top
*/
private boolean shouldBringToTop(IConsole console, IViewPart consoleView) {
- boolean bringToTop= true;
+ boolean bringToTop = true;
if (consoleView instanceof IConsoleView) {
- IConsoleView cView= (IConsoleView)consoleView;
+ IConsoleView cView = (IConsoleView) consoleView;
if (cView.isPinned()) {
- IConsole pinnedConsole= cView.getConsole();
+ IConsole pinnedConsole = cView.getConsole();
bringToTop = console.equals(pinnedConsole);
}
}
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
index b299c8140..e4bf0478d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsolePluginImages.java
@@ -98,6 +98,8 @@ public class ConsolePluginImages {
/**
* Returns the ImageRegistry.
+ *
+ * @return the ImageRegistry
*/
public static ImageRegistry getImageRegistry() {
if (imageRegistry == null) {
@@ -107,11 +109,12 @@ public class ConsolePluginImages {
}
/**
- * Initialize the image registry by declaring all of the required
- * graphics. This involves creating JFace image descriptors describing
- * how to create/find the image should it be needed.
- * The image is not actually allocated until requested.
+ * Initialize the image registry by declaring all of the required graphics. This
+ * involves creating JFace image descriptors describing how to create/find the
+ * image should it be needed. The image is not actually allocated until
+ * requested.
*
+ * <pre>
* Prefix conventions
* Wizard Banners WIZBAN_
* Preference Banners PREF_BAN_
@@ -132,25 +135,36 @@ public class ConsolePluginImages {
* This may mean the same package directory as the package holding this class.
* The images are declared using this.getClass() to ensure they are looked up via
* this plugin class.
- * @see org.eclipse.jface.resource.ImageRegistry
+ * </pre>
+ *
+ * @return the initialized ImageRegistry
+ * @see org.eclipse.jface.resource.ImageRegistry
*/
public static ImageRegistry initializeImageRegistry() {
- imageRegistry= new ImageRegistry(ConsolePlugin.getStandardDisplay());
+ imageRegistry = new ImageRegistry(ConsolePlugin.getStandardDisplay());
declareImages();
return imageRegistry;
}
/**
- * Returns the <code>Image<code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
+ *
+ * @param key the image's key
+ * @return the <code>Image</code> identified by the given key, or
+ * <code>null</code> if it does not exist
*/
public static Image getImage(String key) {
return getImageRegistry().get(key);
}
/**
- * Returns the <code>ImageDescriptor<code> identified by the given key,
- * or <code>null</code> if it does not exist.
+ * Returns the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist.
+ *
+ * @param key the image's key
+ * @return the <code>ImageDescriptor</code> identified by the given key, or
+ * <code>null</code> if it does not exist
*/
public static ImageDescriptor getImageDescriptor(String key) {
return getImageRegistry().getDescriptor(key);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
index 393f0ce12..d73caf60d 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleWorkbenchPart.java
@@ -40,8 +40,10 @@ public class ConsoleWorkbenchPart implements IWorkbenchPart {
}
/**
- * Constructs a part for the given console that binds to the given
- * site
+ * Constructs a part for the given console that binds to the given site.
+ *
+ * @param console the console which is part of the part
+ * @param site the site to bind the part to
*/
public ConsoleWorkbenchPart(IConsole console, IWorkbenchPartSite site) {
fConsole = console;
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
index 67a84a3a6..adb455ab3 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/FollowHyperlinkAction.java
@@ -28,7 +28,9 @@ public class FollowHyperlinkAction extends Action {
private TextConsoleViewer viewer;
/**
- * Constructs a follow link action
+ * Constructs a follow link action.
+ *
+ * @param consoleViewer the viewer containing the link
*/
public FollowHyperlinkAction(TextConsoleViewer consoleViewer) {
super(ConsoleMessages.FollowHyperlinkAction_0);
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
index 9c5bfb919..ded7b0875 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PinConsoleAction.java
@@ -27,7 +27,9 @@ public class PinConsoleAction extends Action implements IUpdate {
private IConsoleView fView = null;
/**
- * Constructs a 'pin console' action
+ * Constructs a 'pin console' action.
+ *
+ * @param view the view to pin with this action
*/
public PinConsoleAction(IConsoleView view) {
super(ConsoleMessages.PinConsoleAction_0, IAction.AS_CHECK_BOX);

Back to the top