Skip to content

Commit a8f5ea3

Browse files
jnerlichvogella
authored andcommitted
Removes unnecessary quotes in coding in markdown documents
1 parent f88d2cf commit a8f5ea3

18 files changed

+89
-113
lines changed

docs/FAQ/FAQ_How_do_I_add_a_builder_to_a_given_project.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ To register the eScript builder for a given project, add the builder to the proj
77

88
private void addBuilder(IProject project, String id) {
99
IProjectDescription desc = project.getDescription();
10-
ICommand\[\] commands = desc.getBuildSpec();
10+
ICommand[] commands = desc.getBuildSpec();
1111
for (int i = 0; i < commands.length; ++i)
12-
if (commands\[i\].getBuilderName().equals(id))
12+
if (commands[i].getBuilderName().equals(id))
1313
return;
1414
//add builder to project
1515
ICommand command = desc.newCommand();
1616
command.setBuilderName(id);
17-
ICommand\[\] nc = new ICommand\[commands.length + 1\];
17+
ICommand[] nc = new ICommand[commands.length + 1];
1818
// Add it before other builders.
1919
System.arraycopy(commands, 0, nc, 1, commands.length);
20-
nc\[0\] = command;
20+
nc[0] = command;
2121
desc.setBuildSpec(nc);
2222
project.setDescription(desc, null);
2323
}

docs/FAQ/FAQ_How_do_I_create_a_dialog_with_a_details_area.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ If you want to provide more information in the details area, you need to supply
1111

1212
Date date = new Date();
1313
SimpleDateFormat format = new SimpleDateFormat();
14-
String\[\] patterns = new String\[\] {
14+
String[] patterns = new String[] {
1515
"EEEE", "yyyy", "MMMM", "h 'o''clock'"};
16-
String\[\] prefixes = new String\[\] {
16+
String[] prefixes = new String[] {
1717
"Today is ", "The year is ", "It is ", "It is "};
18-
String\[\] msg = new String\[patterns.length\];
18+
String[] msg = new String\[patterns.length\];
1919
for (int i = 0; i < msg.length; i++) {
20-
format.applyPattern(patterns\[i\]);
21-
msg\[i\] = prefixes\[i\] + format.format(date);
20+
format.applyPattern(patterns[i]);
21+
msg[i] = prefixes[i] + format.format(date);
2222
}
2323
final String PID = ExamplesPlugin.ID;
24-
MultiStatus info = new MultiStatus(PID, 1, msg\[0\], null);
25-
info.add(new Status(IStatus.INFO, PID, 1, msg\[1\], null));
26-
info.add(new Status(IStatus.INFO, PID, 1, msg\[2\], null));
27-
info.add(new Status(IStatus.INFO, PID, 1, msg\[3\], null));
24+
MultiStatus info = new MultiStatus(PID, 1, msg[0], null);
25+
info.add(new Status(IStatus.INFO, PID, 1, msg[1], null));
26+
info.add(new Status(IStatus.INFO, PID, 1, msg[2], null));
27+
info.add(new Status(IStatus.INFO, PID, 1, msg[3], null));
2828
ErrorDialog.openError(window.getShell(), "Time", null, info);
2929

3030

docs/FAQ/FAQ_How_do_I_customize_the_menus_in_an_RCP_application.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Here is a simple example of an advisor that creates two menus-**Window** and **H
1010

1111
public void fillActionBars(IWorkbenchWindow window,
1212
IActionBarConfigurer configurer, int flags) {
13-
if ((flags & FILL\_MENU\_BAR) == 0)
13+
if ((flags & FILL_MENU_BAR) == 0)
1414
return;
1515
IMenuManager mainMenu = configurer.getMenuManager();
1616
MenuManager windowMenu = new MenuManager("&Window",
@@ -31,13 +31,13 @@ For simplicity, this snippet creates new actions each time fillActionBars is cal
3131
//configurer is provided by initialize method
3232
private IWorkbenchConfigurer configurer = ...;
3333
private static final String MENU_ACTIONS = &menu.actions&;
34-
private IAction\[\] getMenuActions(IWorkbenchWindow window) {
34+
private IAction[] getMenuActions(IWorkbenchWindow window) {
3535
IWorkbenchWindowConfigurer wwc =
3636
configurer.getWindowConfigurer(window);
37-
IAction\[\] actions = (IAction\[\]) wwc.getData(MENU_ACTIONS);
37+
IAction[] actions = (IAction[]) wwc.getData(MENU_ACTIONS);
3838
if (actions == null) {
3939
IAction max = ActionFactory.MAXIMIZE.create(window);
40-
actions = new IAction\[\] {max};
40+
actions = new IAction[] {max};
4141
wwc.setData(MENU_ACTIONS, actions);
4242
}
4343
return actions;
@@ -55,5 +55,5 @@ Note that WorkbenchAdvisor fillActionBars is deprecated and ActionBarAdvisor.fil
5555
See Also:
5656
---------
5757

58-
[FAQ\_How\_do\_I\_build\_menus\_and\_toolbars\_programmatically?](./FAQ_How_do_I_build_menus_and_toolbars_programmatically.md "FAQ How do I build menus and toolbars programmatically?")
58+
[FAQ How do I build menus and toolbars programmatically?](./FAQ_How_do_I_build_menus_and_toolbars_programmatically.md "FAQ How do I build menus and toolbars programmatically?")
5959

docs/FAQ/FAQ_How_do_I_find_all_the_plug-ins_that_contribute_to_my_extension_point.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ How to get all IConfigurationElement objects more simply?
2727
You can also get all IConfigurationElement objects without retrieving each extension by using following code:
2828

2929
IExtensionRegistry reg = Platform.getExtensionRegistry();
30-
IConfigurationElement\[\] elements = reg.getConfigurationElementsFor("Extension Point ID");
30+
IConfigurationElement[] elements = reg.getConfigurationElementsFor("Extension Point ID");
3131

3232
See Also:
3333
---------

docs/FAQ/FAQ_How_do_I_find_out_what_view_or_editor_is_selected.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
2-
31
FAQ How do I find out what view or editor is selected?
42
======================================================
53

64
To find out what view or editor is selected, use the IPartService. As with ISelectionService, you can add a listener to this service to track the active part or simply query it whenever you need to know. Note, saying that the part is _active_ does not imply that it has _focus_. If a dialog opens on top of the workbench window, the active part does not change, even though the active part loses focus. The part service will also notify you when parts are closed, hidden, brought to the top of a stack, and during other lifecycle events.
75

86
Two types of listeners can be added to the part service: IPartListener and the poorly named IPartListener2. You should always use this second one as it can handle part-change events on parts that have not yet been created because they are hidden in a stack behind another part. This listener will also tell you when a part is made visible or hidden or when an editor's input is changed:
97

10-
IWorkbenchPage page = ...;
11-
//the active part
12-
IWorkbenchPart active = page.getActivePart();
13-
//adding a listener
14-
IPartListener2 pl = new IPartListener2() {
15-
public void partActivated(IWorkbenchPartReference ref) {
16-
System.out.println("Active: "+ref.getTitle());
17-
}
18-
... other listener methods ...
19-
};
20-
page.addPartListener(pl);
8+
IWorkbenchPage page = ...;
9+
//the active part
10+
IWorkbenchPart active = page.getActivePart();
11+
//adding a listener
12+
IPartListener2 pl = new IPartListener2() {
13+
public void partActivated(IWorkbenchPartReference ref) {
14+
System.out.println("Active: "+ref.getTitle());
15+
}
16+
... other listener methods ...
17+
};
18+
page.addPartListener(pl);
2119

2220
IWorkbenchPage implements IPartService directly. You can also access a activation service by using IWorkbenchWindow.getPartService.
2321

docs/FAQ/FAQ_How_do_I_implement_Quick_Fixes_for_my_own_language.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ The JDT has support for so-called Quick Fixes. Whenever a marker is generated, a
1616
The implementation class implements the IMarkerResolutionGenerator interface. Use the IMarkerResolutionGenerator2 when resolutions are expensive to implement. See the javadoc for the interface for an explanation. Here is what the implementation class may look like:
1717

1818
public class QuickFixer implements IMarkerResolutionGenerator {
19-
public IMarkerResolution\[\] getResolutions(IMarker mk) {
19+
public IMarkerResolution[] getResolutions(IMarker mk) {
2020
try {
2121
Object problem = mk.getAttribute("WhatsUp");
22-
return new IMarkerResolution\[\] {
22+
return new IMarkerResolution[] {
2323
new QuickFix("Fix #1 for "+problem),
2424
new QuickFix("Fix #2 for "+problem),
2525
};

docs/FAQ/FAQ_How_do_I_implement_an_incremental_project_builder.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To implement an incremental project builder, you first have to create an extensi
2121
The second step is to create a builder class that must extend the abstract IncrementalProjectBuilder superclass:
2222

2323
public class Builder extends IncrementalProjectBuilder {
24-
protected IProject\[\] build(int kind, Map args,
24+
protected IProject[] build(int kind, Map args,
2525
IProgressMonitor monitor) {
2626
if (kind == IncrementalProjectBuilder.FULL_BUILD) {
2727
fullBuild(monitor);

docs/FAQ/FAQ_How_do_I_launch_a_Java_program.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ With those plug-ins added to your dependent plug-in list, your Java program can
1818
IVMInstall vm = JavaRuntime.getVMInstall(proj);
1919
if (vm == null) vm = JavaRuntime.getDefaultVMInstall();
2020
IVMRunner vmr = vm.getVMRunner(ILaunchManager.RUN_MODE);
21-
String\[\] cp = JavaRuntime.
21+
String[] cp = JavaRuntime.
2222
computeDefaultRuntimeClassPath(proj);
2323
VMRunnerConfiguration config =
2424
new VMRunnerConfiguration(main, cp);
@@ -54,5 +54,5 @@ More information is available at **Help > Help Contents > JDT Plug-in Developer
5454
See Also:
5555
---------
5656

57-
[FAQ\_What\_is\_a\_launch_configuration?](./FAQ_What_is_a_launch_configuration.md "FAQ What is a launch configuration?")
57+
[FAQ What is a launch configuration?](./FAQ_What_is_a_launch_configuration.md "FAQ What is a launch configuration?")
5858

docs/FAQ/FAQ_How_do_I_launch_the_preference_page_that_belongs_to_my_plug-in.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The `org.eclipse.ui.dialogs.PreferencesUtil` in bundle `org.eclipse.ui.workbench
99

1010
PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(
1111
shell, "org.eclipse.licensing.ui.licensesPreferencePage",
12-
new String\[\] {"org.eclipse.licensing.ui.licensesPreferencePage"}, null);
12+
new String[] {"org.eclipse.licensing.ui.licensesPreferencePage"}, null);
1313
dialog.open();
1414

1515
Alternative solution

docs/FAQ/FAQ_How_do_I_make_my_plug-in_dynamic_aware.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ The cache has a startup method that loads the initial set of extensions and then
2222
public void startup() {
2323
IExtensionRegistry reg = Platform.getExtensionRegistry();
2424
IExtensionPoint pt = reg.getExtensionPoint(PT_ID);
25-
IExtension\[\] ext = pt.getExtensions();
25+
IExtension[] ext = pt.getExtensions();
2626
for (int i = 0; i < ext.length; i++)
27-
extensions.add(ext\[i\]);
27+
extensions.add(ext[i]);
2828
reg.addRegistryChangeListener(this);
2929
}
3030

3131
The class implements the IRegistryChangeListener interface, which has a single method that is called whenever the registry changes:
3232

3333
public void registryChanged(IRegistryChangeEvent event) {
34-
IExtensionDelta\[\] deltas =
34+
IExtensionDelta[] deltas =
3535
event.getExtensionDeltas(PID, PT_ID);
3636
for (int i = 0; i < deltas.length; i++) {
37-
if (deltas\[i\].getKind() == IExtensionDelta.ADDED)
38-
extensions.add(deltas\[i\].getExtension());
37+
if (deltas[i].getKind() == IExtensionDelta.ADDED)
38+
extensions.add(deltas[i].getExtension());
3939
else
40-
extensions.remove(deltas\[i\].getExtension());
40+
extensions.remove(deltas[i].getExtension());
4141
}
4242
}
4343

@@ -58,6 +58,6 @@ If you hold onto classes defined in other plug-ins through different mechanisms,
5858
See Also:
5959
---------
6060

61-
* [FAQ\_What\_is\_a\_dynamic_plug-in?](./FAQ_What_is_a_dynamic_plug-in.md "FAQ What is a dynamic plug-in?")
62-
* [FAQ\_How\_do\_I\_make\_my\_plug-in\_dynamic\_enabled?](./FAQ_How_do_I_make_my_plug-in_dynamic_enabled.md "FAQ How do I make my plug-in dynamic enabled?")
61+
* [FAQ What is a dynamic plug-in?](./FAQ_What_is_a_dynamic_plug-in.md "FAQ What is a dynamic plug-in?")
62+
* [FAQ How do I make my plug-in dynamic enabled?](./FAQ_How_do_I_make_my_plug-in_dynamic_enabled.md "FAQ How do I make my plug-in dynamic enabled?")
6363

0 commit comments

Comments
 (0)