Skip to content

Commit 52811ff

Browse files
committed
Small fixes in the FAQ markdown documents
1 parent 9348087 commit 52811ff

5 files changed

+19
-21
lines changed

docs/FAQ/FAQ_How_do_I_create_an_executable_JAR_file_for_a_stand-alone_SWT_program.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ The detailed instructions for creating an executable JAR file for a stand-alone
1111
2. Find the correct SWT JAR file for the desired target platform. You can download the desired ZIP file from [the SWT website](https://www.eclipse.org/swt/). For example, for Eclipse 3.3 and a target platform of Linux, download the file swt-3.3.1.1-gtk-linux-x86.zip. Expand this ZIP file and copy the swt.jar file to the runtime folder. Remember that this swt.jar file is specific to one platform, in this case Linux.
1212
3. Create a manifest file for your application using the Eclipse text editor (e.g., myapplication-manifest.txt). The text of the manifest should be as follows:
1313

14-
> Manifest-Version: 1.0
15-
> Class-Path: swt.jar
16-
> Main-Class: mypackage.MyClassWithMainMethod
17-
> (blank line at end of file)
14+
Manifest-Version: 1.0
15+
Class-Path: swt.jar
16+
Main-Class: mypackage.MyClassWithMainMethod
17+
(blank line at end of file)
1818

1919
4. Make sure the manifest file ends with a blank line. Put the name of your package and class that contains the main() method for the Main-Class.
2020
5. In Eclipse, select File/Export/Java/Jar file and press Next.

docs/FAQ/FAQ_How_do_I_create_my_own_tasks,_problems,_bookmarks,_and_so_on.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ FAQ How do I create my own tasks, problems, bookmarks, and so on?
55

66
Annotations can be added to resources in the workspace by creating IMarker objects. These markers are used to represent compile errors, to-do items, bookmarks, search results, and many other types of annotations. You can create your own marker types for storing annotations for use by your own plug-in. Each marker can store an arbitrary set of attributes. Attributes are keyed by a string, and the values can be strings, Booleans, or integers. The IMarker interface defines some common attribute types, but you are free to create your own attribute names for your markers. Here is an example snippet that creates a marker, adds some attributes, and then deletes it:
77

8-
final IFile file = null;
9-
IMarker marker = file.createMarker(IMarker.MARKER);
10-
marker.setAttribute(IMarker.MESSAGE, "This is my marker");
11-
marker.setAttribute("Age", 5);
12-
marker.delete();
8+
final IFile file = null;
9+
IMarker marker = file.createMarker(IMarker.MARKER);
10+
marker.setAttribute(IMarker.MESSAGE, "This is my marker");
11+
marker.setAttribute("Age", 5);
12+
marker.delete();
1313

1414
When markers are created, modified, or deleted, a resource change event will be broadcast, telling interested parties about the change. You can search for markers by using the findMarkers methods on IResource.
1515

docs/FAQ/FAQ_How_do_I_set_a_conditional_breakpoint.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,18 @@ Conditions can also be expressed in terms of other breakpoint attributes, such a
1010
### Why do I get the message "Conditional breakpoint has compilation error(s) - <variable> cannot be resolved" when my breakpoint gets hit?
1111

1212
It can occur that an error message is issued when a conditional breakpoint gets hit, even though the breakpoint condition appears to be syntactically correct:
13-
1413

1514

16-
[![Conditional Breakpoint Error.PNG](/images/f/f4/Conditional_Breakpoint_Error.PNG)](/File:Conditional_Breakpoint_Error.PNG)
15+
![Conditional breakpoint in java.lang.Class.PNG](https://github.com/eclipse-platform/eclipse.platform/blob/master/docs/FAQ/images/Conditional_Breakpoint_Error.PNG)
1716

1817

1918

2019
This can happen if you are setting a breakpoint in a class whose class file does not contain a local variable table. For example, let's say you want to set a conditional breakpoint on `Class.forName(String)`. If you have a source attachment for `rt.jar` the content assist will allow you to refer to the argument by its variable name, `className`. However, at debug runtime, the variable name will only be known if the class file contains a local variable table. Depending on the options used at compilation time, this information may have been stripped from the class file.
2120

2221
In the **Variables** view of the debugger, the argument will appear as `arg`_n_, and that placeholder name can actually also be used in the conditional expression for the breakpoint. So, instead of using the variable name `className` in your conditional expression, you simply use the placeholder `arg0`:
2322

24-
23+
![Conditional breakpoint in java.lang.Class.PNG](https://github.com/eclipse-platform/eclipse.platform/blob/master/docs/FAQ/images/Conditional_breakpoint_in_java.lang.Class.PNG)
2524

26-
[![Conditional breakpoint in java.lang.Class.PNG](/images/a/ae/Conditional_breakpoint_in_java.lang.Class.PNG)](/File:Conditional_breakpoint_in_java.lang.Class.PNG)
2725

2826

2927

docs/FAQ/FAQ_How_do_I_support_formatting_in_my_editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following snippet from the Java source configuration installs a master strat
1010
MultiPassContentFormatter formatter=
1111
new MultiPassContentFormatter(
1212
getConfiguredDocumentPartitioning(viewer),
13-
IDocument.DEFAULT\_CONTENT\_TYPE);
13+
IDocument.DEFAULT_CONTENT_TYPE);
1414
formatter.setMasterStrategy(
1515
new JavaFormattingStrategy());
1616
formatter.setSlaveStrategy(

docs/FAQ/FAQ_Why_should_I_use_the_new_progress_service.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ Eclipse 3.0 introduced a central new workbench _progress service_. This service
77

88
The service is used much like the SWT BusyIndicator. Simply pass an IRunnableWithProgress instance to the busyCursorWhile method. The UI will prevent further user input and report progress feedback until the runnable completes. Note that the runnable executes in a non-UI thread, so you will have to use asyncExec or syncExec to execute any code within the runnable that requires access to UI widgets:
99

10-
IWorkbench wb = PlatformUI.getWorkbench();
11-
IProgressService ps = wb.getProgressService();
12-
ps.busyCursorWhile(new IRunnableWithProgress() {
13-
public void run(IProgressMonitor pm) {
14-
... do some long running task
15-
}
16-
});
10+
IWorkbench wb = PlatformUI.getWorkbench();
11+
IProgressService ps = wb.getProgressService();
12+
ps.busyCursorWhile(new IRunnableWithProgress() {
13+
public void run(IProgressMonitor pm) {
14+
... do some long running task
15+
}
16+
});
1717

1818
This progress service was introduced to unify a number of progress-reporting mechanisms in Eclipse 2.1. JFace provides a Progress Monitor dialog, SWT provides a busy indicator, and the workbench provides a progress indicator on the status line. Each of these mechanisms has its own advantages and disadvantages. The busy cursor is the least obtrusive and works well for tasks that typically take a second or less. The Progress dialog provides much more information and allows the user to cancel but is visually distracting, especially on short tasks as it pops up over the user's work. The status line progress monitor is a bit less obtrusive but doesn't give an obvious indication that the UI is not accepting further input, and the space for presenting progress indication is very constrained. The new progress service tries to achieve a balance by automatically adapting between a busy cursor and a dialog, depending on the situation.
1919

0 commit comments

Comments
 (0)