New upstream release.
Debian Janitor
2 years ago
2 | 2 | <extension> |
3 | 3 | <groupId>org.eclipse.tycho.extras</groupId> |
4 | 4 | <artifactId>tycho-pomless</artifactId> |
5 | <version>2.4.0</version> | |
5 | <version>2.5.0</version> | |
6 | 6 | </extension> |
7 | 7 | </extensions>⏎ |
0 | eclipse-platform-debug (4.22-1) UNRELEASED; urgency=low | |
1 | ||
2 | * New upstream release. | |
3 | ||
4 | -- Debian Janitor <janitor@jelmer.uk> Sat, 29 Jan 2022 04:18:15 -0000 | |
5 | ||
0 | 6 | eclipse-platform-debug (4.21-1) unstable; urgency=medium |
1 | 7 | |
2 | 8 | * New upstream release |
1 | 1 | Bundle-ManifestVersion: 2 |
2 | 2 | Bundle-Name: %pluginName |
3 | 3 | Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true |
4 | Bundle-Version: 3.18.200.qualifier | |
4 | Bundle-Version: 3.18.300.qualifier | |
5 | 5 | Bundle-ClassPath: . |
6 | 6 | Bundle-Activator: org.eclipse.debug.core.DebugPlugin |
7 | 7 | Bundle-Vendor: %providerName |
+1
-1
171 | 171 | /** |
172 | 172 | * Scheduling rule to serialize commands on an object |
173 | 173 | */ |
174 | private class SerialPerObjectRule implements ISchedulingRule { | |
174 | private static class SerialPerObjectRule implements ISchedulingRule { | |
175 | 175 | |
176 | 176 | private Object fObject = null; |
177 | 177 |
215 | 215 | @Override |
216 | 216 | public void terminate() throws DebugException { |
217 | 217 | if (!isTerminated()) { |
218 | if (fStreamsProxy instanceof StreamsProxy) { | |
219 | ((StreamsProxy) fStreamsProxy).kill(); | |
220 | } | |
221 | Process process = getSystemProcess(); | |
222 | if (process == null) { | |
223 | return; | |
224 | } | |
225 | ||
226 | List<ProcessHandle> descendants = Collections.emptyList(); | |
227 | if (fTerminateDescendants) { | |
228 | try { // List of descendants of process is only a snapshot! | |
229 | descendants = process.descendants().collect(Collectors.toList()); | |
230 | } catch (UnsupportedOperationException e) { | |
231 | // JVM may not support toHandle() -> assume no descendants | |
218 | try { | |
219 | Process process = getSystemProcess(); | |
220 | if (process == null) { | |
221 | return; | |
232 | 222 | } |
233 | } | |
234 | ||
235 | process.destroy(); | |
236 | descendants.forEach(ProcessHandle::destroy); | |
237 | ||
238 | // await termination of process and descendants | |
239 | try { // (in total don't wait longer than TERMINATION_TIMEOUT) | |
240 | long waitStart = System.currentTimeMillis(); | |
241 | if (process.waitFor(TERMINATION_TIMEOUT, TimeUnit.MILLISECONDS)) { | |
242 | fExitValue = process.exitValue(); | |
243 | if (waitFor(descendants, waitStart)) { | |
244 | return; | |
223 | ||
224 | List<ProcessHandle> descendants = Collections.emptyList(); | |
225 | if (fTerminateDescendants) { | |
226 | try { // List of descendants of process is only a snapshot! | |
227 | descendants = process.descendants().collect(Collectors.toList()); | |
228 | } catch (UnsupportedOperationException e) { | |
229 | // JVM may not support toHandle() -> assume no | |
230 | // descendants | |
245 | 231 | } |
246 | 232 | } |
247 | } catch (InterruptedException e) { | |
248 | Thread.currentThread().interrupt(); | |
233 | ||
234 | process.destroy(); | |
235 | descendants.forEach(ProcessHandle::destroy); | |
236 | ||
237 | // await termination of process and descendants | |
238 | try { // (in total don't wait longer than TERMINATION_TIMEOUT) | |
239 | long waitStart = System.currentTimeMillis(); | |
240 | if (process.waitFor(TERMINATION_TIMEOUT, TimeUnit.MILLISECONDS)) { | |
241 | fExitValue = process.exitValue(); | |
242 | if (waitFor(descendants, waitStart)) { | |
243 | return; | |
244 | } | |
245 | } | |
246 | } catch (InterruptedException e) { | |
247 | Thread.currentThread().interrupt(); | |
248 | } | |
249 | } finally { | |
250 | if (fStreamsProxy instanceof StreamsProxy) { | |
251 | ((StreamsProxy) fStreamsProxy).kill(); | |
252 | } | |
249 | 253 | } |
250 | 254 | |
251 | 255 | // clean-up |
+12
-7
130 | 130 | * Starts a thread which writes the stream. |
131 | 131 | */ |
132 | 132 | public void startMonitoring() { |
133 | if (fThread == null) { | |
134 | fThread = new Thread((Runnable) this::write, DebugCoreMessages.InputStreamMonitor_label); | |
135 | fThread.setDaemon(true); | |
136 | fThread.start(); | |
133 | synchronized (this) { | |
134 | if (fThread == null) { | |
135 | fThread = new Thread((Runnable) this::write, DebugCoreMessages.InputStreamMonitor_label); | |
136 | fThread.setDaemon(true); | |
137 | fThread.start(); | |
138 | } | |
137 | 139 | } |
138 | 140 | } |
139 | 141 | |
142 | 144 | * monitor and the underlying stream. |
143 | 145 | */ |
144 | 146 | public void close() { |
145 | if (fThread != null) { | |
146 | Thread thread= fThread; | |
147 | fThread= null; | |
147 | Thread thread = null; | |
148 | synchronized (this) { | |
149 | thread = fThread; | |
150 | fThread = null; | |
151 | } | |
152 | if (thread != null) { | |
148 | 153 | thread.interrupt(); |
149 | 154 | } |
150 | 155 | } |
+18
-10
133 | 133 | * underlying stream by waiting for the thread to terminate. |
134 | 134 | */ |
135 | 135 | protected void close() { |
136 | if (fThread != null) { | |
137 | Thread thread = fThread; | |
136 | Thread thread = null; | |
137 | ||
138 | synchronized (this) { | |
139 | thread = fThread; | |
138 | 140 | fThread = null; |
141 | } | |
142 | ||
143 | if (thread != null) { | |
139 | 144 | try { |
140 | 145 | thread.join(); |
141 | 146 | } catch (InterruptedException ie) { |
142 | 147 | } |
143 | fListeners = new ListenerList<>(); | |
144 | fBinaryListeners = new ListenerList<>(); | |
148 | ||
149 | fListeners.clear(); | |
150 | fBinaryListeners.clear(); | |
145 | 151 | } |
146 | 152 | } |
147 | 153 | |
303 | 309 | * Starts a thread which reads from the stream |
304 | 310 | */ |
305 | 311 | protected void startMonitoring() { |
306 | if (fThread == null) { | |
307 | fDone.set(false); | |
308 | fThread = new Thread((Runnable) this::read, DebugCoreMessages.OutputStreamMonitor_label); | |
309 | fThread.setDaemon(true); | |
310 | fThread.setPriority(Thread.MIN_PRIORITY); | |
311 | fThread.start(); | |
312 | synchronized (this) { | |
313 | if (fThread == null) { | |
314 | fDone.set(false); | |
315 | fThread = new Thread((Runnable) this::read, DebugCoreMessages.OutputStreamMonitor_label); | |
316 | fThread.setDaemon(true); | |
317 | fThread.setPriority(Thread.MIN_PRIORITY); | |
318 | fThread.start(); | |
319 | } | |
312 | 320 | } |
313 | 321 | } |
314 | 322 |
74 | 74 | |
75 | 75 | GroupLaunch.name=Launch Group |
76 | 76 | GroupLaunch.description=Launch several other configurations sequentially |
77 | ||
78 | LaunchConfiguration=Launch Configuration |
279 | 279 | public="true"> |
280 | 280 | </launchConfigurationType> |
281 | 281 | </extension> |
282 | <extension | |
283 | point="org.eclipse.core.contenttype.contentTypes"> | |
284 | <content-type | |
285 | base-type="org.eclipse.core.runtime.xml" | |
286 | file-extensions="launch" | |
287 | id="org.eclipse.debug.core.launch" | |
288 | name="%LaunchConfiguration" | |
289 | priority="normal"> | |
290 | </content-type> | |
291 | </extension> | |
282 | 292 | </plugin> |
13 | 13 | <parent> |
14 | 14 | <artifactId>eclipse.platform.debug</artifactId> |
15 | 15 | <groupId>eclipse.platform.debug</groupId> |
16 | <version>4.21.0-SNAPSHOT</version> | |
16 | <version>4.22.0-SNAPSHOT</version> | |
17 | 17 | </parent> |
18 | 18 | <groupId>org.eclipse.debug</groupId> |
19 | 19 | <artifactId>org.eclipse.debug.examples.memory</artifactId> |
13 | 13 | <parent> |
14 | 14 | <artifactId>eclipse.platform.debug</artifactId> |
15 | 15 | <groupId>eclipse.platform.debug</groupId> |
16 | <version>4.21.0-SNAPSHOT</version> | |
16 | <version>4.22.0-SNAPSHOT</version> | |
17 | 17 | </parent> |
18 | 18 | <groupId>org.eclipse.debug</groupId> |
19 | 19 | <artifactId>org.eclipse.debug.examples.mixedmode</artifactId> |
1 | 1 | Bundle-ManifestVersion: 2 |
2 | 2 | Bundle-Name: %pluginName |
3 | 3 | Bundle-SymbolicName: org.eclipse.debug.tests;singleton:=true |
4 | Bundle-Version: 3.12.300.qualifier | |
4 | Bundle-Version: 3.12.400.qualifier | |
5 | 5 | Bundle-Activator: org.eclipse.debug.tests.TestsPlugin |
6 | 6 | Bundle-Localization: plugin |
7 | 7 | Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)", |
13 | 13 | <parent> |
14 | 14 | <artifactId>eclipse.platform.debug</artifactId> |
15 | 15 | <groupId>eclipse.platform.debug</groupId> |
16 | <version>4.21.0-SNAPSHOT</version> | |
16 | <version>4.22.0-SNAPSHOT</version> | |
17 | 17 | </parent> |
18 | 18 | <groupId>org.eclipse.debug</groupId> |
19 | 19 | <artifactId>org.eclipse.debug.tests</artifactId> |
20 | <version>3.12.300-SNAPSHOT</version> | |
20 | <version>3.12.400-SNAPSHOT</version> | |
21 | 21 | <packaging>eclipse-test-plugin</packaging> |
22 | 22 | <properties> |
23 | 23 | <code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings> |
0 | 0 | /******************************************************************************* |
1 | * Copyright (c) 2009, 2020 IBM Corporation and others. | |
1 | * Copyright (c) 2009, 2021 IBM Corporation and others. | |
2 | 2 | * |
3 | 3 | * This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License 2.0 |
44 | 44 | import org.eclipse.debug.tests.statushandlers.StatusHandlerTests; |
45 | 45 | import org.eclipse.debug.tests.stepfilters.StepFiltersTests; |
46 | 46 | import org.eclipse.debug.tests.view.memory.MemoryRenderingTests; |
47 | import org.eclipse.debug.tests.view.memory.TableRenderingTests; | |
47 | 48 | import org.eclipse.debug.tests.viewer.model.ChildrenUpdateTests; |
48 | 49 | import org.eclipse.debug.tests.viewer.model.FilterTransformTests; |
49 | 50 | import org.eclipse.debug.tests.viewer.model.PresentationContextTests; |
90 | 91 | |
91 | 92 | // Memory view |
92 | 93 | MemoryRenderingTests.class, |
94 | TableRenderingTests.class, | |
93 | 95 | |
94 | 96 | // Launch framework |
95 | 97 | LaunchConfigurationTests.class, |
14 | 14 | |
15 | 15 | import java.io.ByteArrayInputStream; |
16 | 16 | import java.io.ByteArrayOutputStream; |
17 | import java.io.IOException; | |
17 | 18 | import java.io.InputStream; |
18 | 19 | import java.io.OutputStream; |
19 | 20 | import java.util.Map; |
72 | 73 | private int terminationDelay = 0; |
73 | 74 | |
74 | 75 | /** |
76 | * For mode used by constructor {@link MockProcess#MockProcess()} this | |
77 | * indicates via stdout what the state of the process is. | |
78 | */ | |
79 | public static enum ProcessState { | |
80 | RUNNING('R'), DESTROYING('D'), | |
81 | /** | |
82 | * Last read is special as it should only be returned once to ensure | |
83 | * that we get the last character on the stream. | |
84 | */ | |
85 | LASTREAD('L'), TERMINATED(-1); | |
86 | ||
87 | private int code; | |
88 | ||
89 | ProcessState(int c) { | |
90 | this.code = c; | |
91 | } | |
92 | ||
93 | public int getCode() { | |
94 | return code; | |
95 | } | |
96 | } | |
97 | ||
98 | private volatile ProcessState processState = ProcessState.RUNNING; | |
99 | ||
100 | /** | |
75 | 101 | * Create new silent mockup process which runs for a given amount of time. |
76 | 102 | * Does not read input or produce any output. |
77 | 103 | * |
140 | 166 | } |
141 | 167 | |
142 | 168 | /** |
169 | * Create a new mock process that the stdout stream will indicate status of | |
170 | * the process. The codes are defined by {@link ProcessState#getCode()} | |
171 | */ | |
172 | public MockProcess() { | |
173 | super(); | |
174 | this.stderr = new ByteArrayInputStream(new byte[0]); | |
175 | this.endTime = RUN_FOREVER; | |
176 | this.stdout = new InputStream() { | |
177 | @Override | |
178 | public int read() throws IOException { | |
179 | if (processState == ProcessState.LASTREAD) { | |
180 | /* | |
181 | * This sleep makes | |
182 | * RuntimeProcessTests.testOutputAfterDestroy() fail because | |
183 | * RuntimeProcess.terminate does not wait until the monitor | |
184 | * threads completes. The sleep here just helps amplify a | |
185 | * the thread scheduling decision that otherwise makes | |
186 | * testOutputAfterDestroy unstable (as reported in Bug | |
187 | * 577185) | |
188 | */ | |
189 | try { | |
190 | Thread.sleep(1000); | |
191 | } catch (InterruptedException e) { | |
192 | } | |
193 | processState = ProcessState.TERMINATED; | |
194 | return ProcessState.LASTREAD.getCode(); | |
195 | } | |
196 | return processState.getCode(); | |
197 | } | |
198 | }; | |
199 | } | |
200 | ||
201 | /** | |
143 | 202 | * Get bytes received through stdin since last invocation of this method. |
144 | 203 | * <p> |
145 | 204 | * Not thread safe. It may miss some input if new content is written while |
193 | 252 | } |
194 | 253 | } |
195 | 254 | } |
196 | handle.ifPresent(MockProcessHandle::setTerminated); | |
255 | setTerminated(); | |
197 | 256 | return exitCode; |
198 | 257 | } |
199 | 258 | |
212 | 271 | } |
213 | 272 | } |
214 | 273 | if (isTerminated()) { |
215 | handle.ifPresent(MockProcessHandle::setTerminated); | |
274 | setTerminated(); | |
216 | 275 | } |
217 | 276 | return isTerminated(); |
218 | 277 | } |
238 | 297 | * and before the mockup process goes in terminated state |
239 | 298 | */ |
240 | 299 | public void destroy(int delay) { |
300 | processState = ProcessState.DESTROYING; | |
241 | 301 | synchronized (waitForTerminationLock) { |
242 | 302 | endTime = System.currentTimeMillis() + delay; |
243 | 303 | waitForTerminationLock.notifyAll(); |
244 | 304 | if (delay <= 0) { |
245 | handle.ifPresent(MockProcessHandle::setTerminated); | |
305 | setTerminated(); | |
246 | 306 | } |
247 | 307 | } |
248 | 308 | } |
332 | 392 | } |
333 | 393 | return (RuntimeProcess) DebugPlugin.newProcess(new Launch(launchConfiguration, ILaunchManager.RUN_MODE, null), this, name); |
334 | 394 | } |
395 | ||
396 | /** | |
397 | * Move state machines to terminated. | |
398 | */ | |
399 | private void setTerminated() { | |
400 | synchronized (this) { | |
401 | if (processState != ProcessState.TERMINATED) { | |
402 | processState = ProcessState.LASTREAD; | |
403 | } | |
404 | } | |
405 | handle.ifPresent(MockProcessHandle::setTerminated); | |
406 | } | |
335 | 407 | } |
+36
-0
20 | 20 | import static org.junit.Assert.assertThrows; |
21 | 21 | import static org.junit.Assert.assertTrue; |
22 | 22 | |
23 | import java.io.InputStream; | |
24 | import java.util.Collections; | |
23 | 25 | import java.util.List; |
24 | 26 | import java.util.Map; |
25 | 27 | import java.util.concurrent.atomic.AtomicInteger; |
26 | 28 | |
29 | import org.eclipse.core.runtime.IStatus; | |
27 | 30 | import org.eclipse.debug.core.DebugEvent; |
28 | 31 | import org.eclipse.debug.core.DebugException; |
29 | 32 | import org.eclipse.debug.core.DebugPlugin; |
33 | import org.eclipse.debug.core.model.IProcess; | |
30 | 34 | import org.eclipse.debug.core.model.RuntimeProcess; |
31 | 35 | import org.eclipse.debug.internal.core.DebugCoreMessages; |
32 | 36 | import org.eclipse.debug.tests.AbstractDebugTest; |
33 | 37 | import org.eclipse.debug.tests.TestUtil; |
38 | import org.eclipse.debug.tests.sourcelookup.TestLaunch; | |
39 | import org.junit.Ignore; | |
34 | 40 | import org.junit.Test; |
35 | 41 | |
36 | 42 | public class RuntimeProcessTests extends AbstractDebugTest { |
205 | 211 | DebugException timeoutException = assertThrows(DebugException.class, runtimeProcess::terminate); |
206 | 212 | assertThat(timeoutException.getMessage(), is(DebugCoreMessages.RuntimeProcess_terminate_failed)); |
207 | 213 | } |
214 | ||
215 | /** | |
216 | * See comment in MockProcess.MockProcess().new InputStream() {...}.read() | |
217 | * for why this test fails | |
218 | */ | |
219 | @Test | |
220 | @Ignore("See https://bugs.eclipse.org/bugs/show_bug.cgi?id=577189") | |
221 | public void testOutputAfterDestroy() throws Exception { | |
222 | MockProcess proc = new MockProcess(); | |
223 | ||
224 | IProcess iProc = new RuntimeProcess(new TestLaunch(), proc, "foo", Collections.emptyMap()); | |
225 | iProc.terminate(); | |
226 | ||
227 | String str = iProc.getStreamsProxy().getOutputStreamMonitor().getContents(); | |
228 | TestUtil.log(IStatus.INFO, name.getMethodName(), "Stream result: "); | |
229 | for (int i = 0; i < str.length(); i += 100) { | |
230 | TestUtil.log(IStatus.INFO, name.getMethodName(), str.substring(i, Math.min(i + 100, str.length()))); | |
231 | } | |
232 | TestUtil.log(IStatus.INFO, name.getMethodName(), "Stream done."); | |
233 | // Make sure that the inputstream (process's stdout) has been fully read | |
234 | // and is at EOF | |
235 | @SuppressWarnings("resource") | |
236 | InputStream inputStream = proc.getInputStream(); | |
237 | assertEquals(-1, inputStream.read()); | |
238 | // Make sure that the last character in the stream makes it through to | |
239 | // the monitor | |
240 | assertTrue(str.endsWith(String.valueOf((char) MockProcess.ProcessState.LASTREAD.getCode()))); | |
241 | } | |
242 | ||
243 | ||
208 | 244 | } |
+146
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2021 John Dallaway and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * John Dallaway - initial implementation | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.tests.view.memory; | |
14 | ||
15 | import static org.junit.Assert.assertArrayEquals; | |
16 | import static org.junit.Assert.assertEquals; | |
17 | ||
18 | import java.math.BigInteger; | |
19 | import org.eclipse.debug.core.DebugException; | |
20 | import org.eclipse.debug.core.model.IMemoryBlockExtension; | |
21 | import org.eclipse.debug.core.model.MemoryByte; | |
22 | import org.eclipse.debug.internal.ui.views.memory.renderings.AbstractIntegerRendering; | |
23 | import org.eclipse.debug.internal.ui.views.memory.renderings.HexIntegerRendering; | |
24 | import org.eclipse.debug.internal.ui.views.memory.renderings.RenderingsUtil; | |
25 | import org.eclipse.debug.internal.ui.views.memory.renderings.SignedIntegerRendering; | |
26 | import org.eclipse.debug.internal.ui.views.memory.renderings.UnsignedIntegerRendering; | |
27 | import org.junit.Test; | |
28 | ||
29 | /** | |
30 | * Tests for translation of memory bytes between in-memory representation and UI | |
31 | * presentation | |
32 | */ | |
33 | @SuppressWarnings("restriction") | |
34 | public class TableRenderingTests { | |
35 | ||
36 | private static final byte[] BYTES_1 = new byte[] { (byte) 0x87 }; | |
37 | private static final byte[] BYTES_2 = new byte[] { (byte) 0x98, (byte) 0x76 }; | |
38 | private static final byte[] BYTES_4 = new byte[] { (byte) 0xba, (byte) 0x98, (byte) 0x76, (byte) 0x54 }; | |
39 | private static final byte[] BYTES_8 = new byte[] { | |
40 | (byte) 0xfe, (byte) 0xdc, (byte) 0xba, (byte) 0x98, | |
41 | (byte) 0x76, (byte) 0x54, (byte) 0x32, (byte) 0x10 }; | |
42 | private static final byte[] BYTES_16 = new byte[16]; | |
43 | private static final byte[] BYTES_24 = new byte[24]; | |
44 | ||
45 | static { | |
46 | BYTES_16[0] = (byte) 0x80; // 2 ^ 127 | |
47 | BYTES_24[0] = (byte) 0x80; // 2 ^ 191 | |
48 | } | |
49 | ||
50 | @Test | |
51 | public void testHexIntegerRendering() throws DebugException { | |
52 | testIntegerRendering(createHexIntegerRendering(1), BYTES_1, "87", "87"); //$NON-NLS-1$ //$NON-NLS-2$ | |
53 | testIntegerRendering(createHexIntegerRendering(1), BYTES_2, "9876", "7698"); //$NON-NLS-1$ //$NON-NLS-2$ | |
54 | testIntegerRendering(createHexIntegerRendering(2), BYTES_2, "9876", "9876"); //$NON-NLS-1$ //$NON-NLS-2$ | |
55 | testIntegerRendering(createHexIntegerRendering(1), BYTES_4, "BA987654", "547698BA"); //$NON-NLS-1$ //$NON-NLS-2$ | |
56 | testIntegerRendering(createHexIntegerRendering(2), BYTES_4, "BA987654", "7654BA98"); //$NON-NLS-1$ //$NON-NLS-2$ | |
57 | testIntegerRendering(createHexIntegerRendering(4), BYTES_4, "BA987654", "BA987654"); //$NON-NLS-1$ //$NON-NLS-2$ | |
58 | testIntegerRendering(createHexIntegerRendering(1), BYTES_8, "FEDCBA9876543210", "1032547698BADCFE"); //$NON-NLS-1$ //$NON-NLS-2$ | |
59 | testIntegerRendering(createHexIntegerRendering(4), BYTES_8, "FEDCBA9876543210", "76543210FEDCBA98"); //$NON-NLS-1$ //$NON-NLS-2$ | |
60 | testIntegerRendering(createHexIntegerRendering(4), BYTES_16, "80000000000000000000000000000000", "00000000000000000000000080000000"); //$NON-NLS-1$ //$NON-NLS-2$ | |
61 | testIntegerRendering(createHexIntegerRendering(4), BYTES_24, "800000000000000000000000000000000000000000000000", "000000000000000000000000000000000000000080000000"); //$NON-NLS-1$ //$NON-NLS-2$ | |
62 | } | |
63 | ||
64 | @Test | |
65 | public void testSignedIntegerRendering() throws DebugException { | |
66 | testIntegerRendering(createSignedIntegerRendering(1, BYTES_1.length), BYTES_1, "-121", "-121"); //$NON-NLS-1$ //$NON-NLS-2$ | |
67 | testIntegerRendering(createSignedIntegerRendering(1, BYTES_2.length), BYTES_2, "-26506", "30360"); //$NON-NLS-1$ //$NON-NLS-2$ | |
68 | testIntegerRendering(createSignedIntegerRendering(2, BYTES_2.length), BYTES_2, "-26506", "-26506"); //$NON-NLS-1$ //$NON-NLS-2$ | |
69 | testIntegerRendering(createSignedIntegerRendering(1, BYTES_4.length), BYTES_4, "-1164413356", "1417058490"); //$NON-NLS-1$ //$NON-NLS-2$ | |
70 | testIntegerRendering(createSignedIntegerRendering(2, BYTES_4.length), BYTES_4, "-1164413356", "1985264280"); //$NON-NLS-1$ //$NON-NLS-2$ | |
71 | testIntegerRendering(createSignedIntegerRendering(4, BYTES_4.length), BYTES_4, "-1164413356", "-1164413356"); //$NON-NLS-1$ //$NON-NLS-2$ | |
72 | testIntegerRendering(createSignedIntegerRendering(1, BYTES_8.length), BYTES_8, "-81985529216486896", "1167088121787636990"); //$NON-NLS-1$ //$NON-NLS-2$ | |
73 | testIntegerRendering(createSignedIntegerRendering(4, BYTES_8.length), BYTES_8, "-81985529216486896", "8526495043095935640"); //$NON-NLS-1$ //$NON-NLS-2$ | |
74 | testIntegerRendering(createSignedIntegerRendering(8, BYTES_8.length), BYTES_8, "-81985529216486896", "-81985529216486896"); //$NON-NLS-1$ //$NON-NLS-2$ | |
75 | testIntegerRendering(createSignedIntegerRendering(2, BYTES_16.length), BYTES_16, BigInteger.valueOf(2).pow(127).negate().toString(), "32768"); //$NON-NLS-1$ | |
76 | testIntegerRendering(createSignedIntegerRendering(2, BYTES_24.length), BYTES_24, BigInteger.valueOf(2).pow(191).negate().toString(), "32768"); //$NON-NLS-1$ | |
77 | } | |
78 | ||
79 | @Test | |
80 | public void testUnsignedIntegerRendering() throws DebugException { | |
81 | testIntegerRendering(createUnsignedIntegerRendering(1, BYTES_1.length), BYTES_1, "135", "135"); //$NON-NLS-1$ //$NON-NLS-2$ | |
82 | testIntegerRendering(createUnsignedIntegerRendering(1, BYTES_2.length), BYTES_2, "39030", "30360"); //$NON-NLS-1$ //$NON-NLS-2$ | |
83 | testIntegerRendering(createUnsignedIntegerRendering(2, BYTES_2.length), BYTES_2, "39030", "39030"); //$NON-NLS-1$ //$NON-NLS-2$ | |
84 | testIntegerRendering(createUnsignedIntegerRendering(1, BYTES_4.length), BYTES_4, "3130553940", "1417058490"); //$NON-NLS-1$ //$NON-NLS-2$ | |
85 | testIntegerRendering(createUnsignedIntegerRendering(2, BYTES_4.length), BYTES_4, "3130553940", "1985264280"); //$NON-NLS-1$ //$NON-NLS-2$ | |
86 | testIntegerRendering(createUnsignedIntegerRendering(4, BYTES_4.length), BYTES_4, "3130553940", "3130553940"); //$NON-NLS-1$ //$NON-NLS-2$ | |
87 | testIntegerRendering(createUnsignedIntegerRendering(1, BYTES_8.length), BYTES_8, "18364758544493064720", "1167088121787636990"); //$NON-NLS-1$ //$NON-NLS-2$ | |
88 | testIntegerRendering(createUnsignedIntegerRendering(4, BYTES_8.length), BYTES_8, "18364758544493064720", "8526495043095935640"); //$NON-NLS-1$ //$NON-NLS-2$ | |
89 | testIntegerRendering(createUnsignedIntegerRendering(8, BYTES_8.length), BYTES_8, "18364758544493064720", "18364758544493064720"); //$NON-NLS-1$ //$NON-NLS-2$ | |
90 | testIntegerRendering(createUnsignedIntegerRendering(2, BYTES_16.length), BYTES_16, BigInteger.valueOf(2).pow(127).toString(), "32768"); //$NON-NLS-1$ | |
91 | testIntegerRendering(createUnsignedIntegerRendering(2, BYTES_24.length), BYTES_24, BigInteger.valueOf(2).pow(191).toString(), "32768"); //$NON-NLS-1$ | |
92 | } | |
93 | ||
94 | private void testIntegerRendering(AbstractIntegerRendering rendering, byte[] bytes, String bigEndianString, String littleEndianString) throws DebugException { | |
95 | final IMemoryBlockExtension block = new TableRenderingTestsMemoryBlock(bytes, rendering.getAddressableSize()); | |
96 | rendering.init(null, block); | |
97 | final MemoryByte[] memoryBytes = block.getBytesFromOffset(BigInteger.ZERO, bytes.length / rendering.getAddressableSize()); | |
98 | ||
99 | rendering.setDisplayEndianess(RenderingsUtil.BIG_ENDIAN); | |
100 | assertEquals(bigEndianString, rendering.getString(null, null, memoryBytes)); | |
101 | assertArrayEquals(bytes, rendering.getBytes(null, null, memoryBytes, bigEndianString)); | |
102 | ||
103 | rendering.setDisplayEndianess(RenderingsUtil.LITTLE_ENDIAN); | |
104 | assertEquals(littleEndianString, rendering.getString(null, null, memoryBytes)); | |
105 | assertArrayEquals(bytes, rendering.getBytes(null, null, memoryBytes, littleEndianString)); | |
106 | } | |
107 | ||
108 | private HexIntegerRendering createHexIntegerRendering(int addressableSize) { | |
109 | return new HexIntegerRendering(null) { | |
110 | @Override | |
111 | public int getAddressableSize() { | |
112 | return addressableSize; | |
113 | } | |
114 | }; | |
115 | } | |
116 | ||
117 | private SignedIntegerRendering createSignedIntegerRendering(int addressableSize, int bytesPerColumn) { | |
118 | return new SignedIntegerRendering(null) { | |
119 | @Override | |
120 | public int getAddressableSize() { | |
121 | return addressableSize; | |
122 | } | |
123 | ||
124 | @Override | |
125 | public int getBytesPerColumn() { | |
126 | return bytesPerColumn; | |
127 | } | |
128 | }; | |
129 | } | |
130 | ||
131 | private UnsignedIntegerRendering createUnsignedIntegerRendering(int addressableSize, int bytesPerColumn) { | |
132 | return new UnsignedIntegerRendering(null) { | |
133 | @Override | |
134 | public int getAddressableSize() { | |
135 | return addressableSize; | |
136 | } | |
137 | ||
138 | @Override | |
139 | public int getBytesPerColumn() { | |
140 | return bytesPerColumn; | |
141 | } | |
142 | }; | |
143 | } | |
144 | ||
145 | } |
+173
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2021 John Dallaway and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * John Dallaway - initial implementation | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.tests.view.memory; | |
14 | ||
15 | import java.math.BigInteger; | |
16 | ||
17 | import org.eclipse.debug.core.DebugException; | |
18 | import org.eclipse.debug.core.ILaunch; | |
19 | import org.eclipse.debug.core.model.IDebugTarget; | |
20 | import org.eclipse.debug.core.model.IMemoryBlockExtension; | |
21 | import org.eclipse.debug.core.model.IMemoryBlockRetrieval; | |
22 | import org.eclipse.debug.core.model.MemoryByte; | |
23 | ||
24 | /** | |
25 | * Minimal memory block implementation for use with | |
26 | * {@link org.eclipse.debug.tests.view.memory.TableRenderingTests} only | |
27 | */ | |
28 | public class TableRenderingTestsMemoryBlock implements IMemoryBlockExtension { | |
29 | ||
30 | private int fAddressableSize; | |
31 | private byte[] fBytes; | |
32 | ||
33 | public TableRenderingTestsMemoryBlock(byte[] bytes, int addressableSize) { | |
34 | fBytes = bytes; | |
35 | fAddressableSize = addressableSize; | |
36 | } | |
37 | ||
38 | @Override | |
39 | public long getStartAddress() { | |
40 | return 0; | |
41 | } | |
42 | ||
43 | @Override | |
44 | public long getLength() { | |
45 | return fBytes.length; | |
46 | } | |
47 | ||
48 | @Override | |
49 | public byte[] getBytes() throws DebugException { | |
50 | return fBytes; | |
51 | } | |
52 | ||
53 | @Override | |
54 | public boolean supportsValueModification() { | |
55 | return false; | |
56 | } | |
57 | ||
58 | @Override | |
59 | public void setValue(long offset, byte[] bytes) throws DebugException { | |
60 | } | |
61 | ||
62 | @Override | |
63 | public String getModelIdentifier() { | |
64 | return null; | |
65 | } | |
66 | ||
67 | @Override | |
68 | public IDebugTarget getDebugTarget() { | |
69 | return null; | |
70 | } | |
71 | ||
72 | @Override | |
73 | public ILaunch getLaunch() { | |
74 | return null; | |
75 | } | |
76 | ||
77 | @Override | |
78 | public <T> T getAdapter(Class<T> adapter) { | |
79 | return null; | |
80 | } | |
81 | ||
82 | @Override | |
83 | public String getExpression() { | |
84 | return null; | |
85 | } | |
86 | ||
87 | @Override | |
88 | public BigInteger getBigBaseAddress() throws DebugException { | |
89 | return null; | |
90 | } | |
91 | ||
92 | @Override | |
93 | public BigInteger getMemoryBlockStartAddress() throws DebugException { | |
94 | return null; | |
95 | } | |
96 | ||
97 | @Override | |
98 | public BigInteger getMemoryBlockEndAddress() throws DebugException { | |
99 | return null; | |
100 | } | |
101 | ||
102 | @Override | |
103 | public BigInteger getBigLength() throws DebugException { | |
104 | return null; | |
105 | } | |
106 | ||
107 | @Override | |
108 | public int getAddressSize() throws DebugException { | |
109 | return 0; | |
110 | } | |
111 | ||
112 | @Override | |
113 | public boolean supportBaseAddressModification() throws DebugException { | |
114 | return false; | |
115 | } | |
116 | ||
117 | @Override | |
118 | public boolean supportsChangeManagement() { | |
119 | return false; | |
120 | } | |
121 | ||
122 | @Override | |
123 | public void setBaseAddress(BigInteger address) throws DebugException { | |
124 | } | |
125 | ||
126 | @Override | |
127 | public MemoryByte[] getBytesFromOffset(BigInteger unitOffset, long addressableUnits) throws DebugException { | |
128 | assert BigInteger.ZERO.equals(unitOffset); | |
129 | final MemoryByte[] memoryBytes = new MemoryByte[(int) (addressableUnits * getAddressableSize())]; | |
130 | for (int n = 0; n < memoryBytes.length; n++) { | |
131 | memoryBytes[n] = new MemoryByte(fBytes[n]); | |
132 | } | |
133 | return memoryBytes; | |
134 | } | |
135 | ||
136 | @Override | |
137 | public MemoryByte[] getBytesFromAddress(BigInteger address, long units) throws DebugException { | |
138 | return null; | |
139 | } | |
140 | ||
141 | @Override | |
142 | public void setValue(BigInteger offset, byte[] bytes) throws DebugException { | |
143 | } | |
144 | ||
145 | @Override | |
146 | public void connect(Object client) { | |
147 | } | |
148 | ||
149 | @Override | |
150 | public void disconnect(Object client) { | |
151 | } | |
152 | ||
153 | @Override | |
154 | public Object[] getConnections() { | |
155 | return null; | |
156 | } | |
157 | ||
158 | @Override | |
159 | public void dispose() throws DebugException { | |
160 | } | |
161 | ||
162 | @Override | |
163 | public IMemoryBlockRetrieval getMemoryBlockRetrieval() { | |
164 | return null; | |
165 | } | |
166 | ||
167 | @Override | |
168 | public int getAddressableSize() throws DebugException { | |
169 | return fAddressableSize; | |
170 | } | |
171 | ||
172 | } |
1 | 1 | Bundle-ManifestVersion: 2 |
2 | 2 | Bundle-Name: %pluginName |
3 | 3 | Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true |
4 | Bundle-Version: 3.15.100.qualifier | |
4 | Bundle-Version: 3.15.200.qualifier | |
5 | 5 | Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin |
6 | 6 | Bundle-Vendor: %providerName |
7 | 7 | Bundle-Localization: plugin |
11 | 11 | org.eclipse.jdt.debug.tests, |
12 | 12 | org.eclipse.debug.tests, |
13 | 13 | org.eclipse.debug.examples.ui, |
14 | org.eclipse.debug.examples.mixedmode", | |
14 | org.eclipse.debug.examples.mixedmode, | |
15 | org.eclipse.debug.ui.launchview", | |
15 | 16 | org.eclipse.debug.internal.ui.actions;x-internal:=true, |
16 | 17 | org.eclipse.debug.internal.ui.actions.breakpointGroups;x-internal:=true, |
17 | 18 | org.eclipse.debug.internal.ui.actions.breakpointSortBy;x-internal:=true, |
47 | 48 | org.eclipse.debug.internal.ui.viewers.model;x-friends:="org.eclipse.debug.tests,org.eclipse.jdt.debug.tests,org.eclipse.debug.examples.ui", |
48 | 49 | org.eclipse.debug.internal.ui.viewers.model.provisional; |
49 | 50 | x-friends:="org.eclipse.cdt.dsf.gdb.ui, |
51 | org.eclipse.debug.internal.ui.views.memory.renderings;x-internal:=true, | |
50 | 52 | org.eclipse.cdt.dsf.ui, |
51 | 53 | org.eclipse.debug.examples.ui, |
52 | 54 | org.eclipse.debug.tests, |
Binary diff not shown
Binary diff not shown
3384 | 3384 | class="org.eclipse.debug.internal.ui.quickaccess.ProfileQuickAccessComputer" |
3385 | 3385 | name="%ProfileDropDownAction.label"/> |
3386 | 3386 | </extension> |
3387 | <extension | |
3388 | point="org.eclipse.ui.genericeditor.icons"> | |
3389 | <icon | |
3390 | contentType="org.eclipse.debug.core.launch" | |
3391 | icon="icons/full/obj16/launchConfiguration.png"> | |
3392 | </icon> | |
3393 | </extension> | |
3387 | 3394 | </plugin> |
14 | 14 | <parent> |
15 | 15 | <artifactId>eclipse.platform.debug</artifactId> |
16 | 16 | <groupId>eclipse.platform.debug</groupId> |
17 | <version>4.21.0-SNAPSHOT</version> | |
17 | <version>4.22.0-SNAPSHOT</version> | |
18 | 18 | </parent> |
19 | 19 | <groupId>org.eclipse.debug</groupId> |
20 | 20 | <artifactId>org.eclipse.debug.ui</artifactId> |
21 | <version>3.15.100-SNAPSHOT</version> | |
21 | <version>3.15.200-SNAPSHOT</version> | |
22 | 22 | <packaging>eclipse-plugin</packaging> |
23 | 23 | <properties> |
24 | 24 | <code.ignoredWarnings>-warn:+resource,-deprecation,unavoidableGenericProblems</code.ignoredWarnings> |
+3
-0
982 | 982 | base = DebugPluginImages.getImage(IInternalDebugUIConstants.IMG_OVR_TRANSPARENT); |
983 | 983 | } |
984 | 984 | base = new Image(Display.getCurrent(), base, SWT.IMAGE_COPY); |
985 | // register the base image, to avoid nondisposed resource error | |
986 | fErrorImages.put(key + "-baseImage", base); //$NON-NLS-1$ | |
987 | ||
985 | 988 | LaunchConfigurationTabImageDescriptor desc = new LaunchConfigurationTabImageDescriptor(base, LaunchConfigurationTabImageDescriptor.ERROR); |
986 | 989 | image = desc.createImage(); |
987 | 990 | fErrorImages.put(key, image); |
+15
-2
400 | 400 | |
401 | 401 | private class DelayedDoModelChangedJob extends WorkbenchJob { |
402 | 402 | |
403 | // limit batch size to avoid freezing the UI. | |
404 | private static final int MAX_BATCH_SIZE = 100; | |
405 | ||
403 | 406 | // queue of submitted deltas to process |
404 | 407 | private final List<Object> fQueue = new ArrayList<>(); |
405 | 408 | private boolean shutdown; |
417 | 420 | if (shutdown || fQueue.isEmpty()) { |
418 | 421 | return Status.OK_STATUS; |
419 | 422 | } |
420 | currentBatch = new ArrayList<>(fQueue); | |
421 | fQueue.clear(); | |
423 | fQueue.removeIf(o -> { | |
424 | if (currentBatch.size() < MAX_BATCH_SIZE) { | |
425 | currentBatch.add(o); | |
426 | return true; | |
427 | } | |
428 | return false; | |
429 | }); | |
430 | if (!fQueue.isEmpty()) { | |
431 | // There is work left. | |
432 | // Give other UI tasks chance to work instead of freezing UI | |
433 | schedule(); | |
434 | } | |
422 | 435 | } |
423 | 436 | if (DebugUIPlugin.DEBUG_CONTENT_PROVIDER) { |
424 | 437 | DebugUIPlugin.trace("Delayed batch size: " + currentBatch.size()); //$NON-NLS-1$ |
+8
-5
0 | 0 | /******************************************************************************* |
1 | * Copyright (c) 2007 IBM Corporation and others. | |
1 | * Copyright (c) 2007, 2021 IBM Corporation and others. | |
2 | 2 | * |
3 | 3 | * This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License 2.0 |
10 | 10 | * Contributors: |
11 | 11 | * IBM Corporation - initial API and implementation |
12 | 12 | * David Pickens - [Memory View] Endian in hex view and ASCII view doesn't work |
13 | * John Dallaway - Accommodate addressableSize != 1 (bug 575413) | |
13 | 14 | *******************************************************************************/ |
14 | 15 | package org.eclipse.debug.internal.ui.views.memory.renderings; |
15 | 16 | |
38 | 39 | String paddedStr = DebugUIPlugin.getDefault().getPreferenceStore().getString(IDebugUIConstants.PREF_PADDED_STR); |
39 | 40 | |
40 | 41 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) { |
42 | int addressableSize = getAddressableSize(); | |
41 | 43 | MemoryByte[] swapped = new MemoryByte[data.length]; |
42 | for (int i = 0; i < data.length; i++){ | |
43 | swapped[data.length-i-1] = data[i]; | |
44 | for (int i = 0; i < data.length; i += addressableSize) { | |
45 | System.arraycopy(data, i, swapped, data.length - i - addressableSize, addressableSize); | |
44 | 46 | } |
45 | 47 | data = swapped; |
46 | 48 | } |
81 | 83 | |
82 | 84 | |
83 | 85 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) { |
86 | int addressableSize = getAddressableSize(); | |
84 | 87 | byte[] swapped = new byte[bytes.length]; |
85 | for (int i = 0; i < bytes.length; i++){ | |
86 | swapped[bytes.length-i-1] = bytes[i]; | |
88 | for (int i = 0; i < bytes.length; i += addressableSize) { | |
89 | System.arraycopy(bytes, i, swapped, bytes.length - i - addressableSize, addressableSize); | |
87 | 90 | } |
88 | 91 | bytes = swapped; |
89 | 92 | } |
+110
-85
0 | 0 | /******************************************************************************* |
1 | * Copyright (c) 2004, 2015 IBM Corporation and others. | |
1 | * Copyright (c) 2004, 2021 IBM Corporation and others. | |
2 | 2 | * |
3 | 3 | * This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License 2.0 |
9 | 9 | * |
10 | 10 | * Contributors: |
11 | 11 | * IBM Corporation - initial API and implementation |
12 | * John Dallaway - Accommodate addressableSize != 1 (bug 577106) | |
12 | 13 | *******************************************************************************/ |
13 | 14 | package org.eclipse.debug.internal.ui.views.memory.renderings; |
14 | 15 | |
71 | 72 | return array; |
72 | 73 | } |
73 | 74 | |
74 | static public BigInteger convertByteArrayToUnsignedLong(byte[] array, int endianess) | |
75 | static public BigInteger convertByteArrayToUnsignedLong(byte[] array, int endianess, int addressableSize) | |
75 | 76 | { |
76 | 77 | if (array.length < 8) |
77 | 78 | { |
81 | 82 | BigInteger value = new BigInteger("0"); //$NON-NLS-1$ |
82 | 83 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
83 | 84 | { |
84 | for (int i=0; i< 8; i++) | |
85 | { | |
86 | byte[] temp = new byte[1]; | |
87 | temp[0] = array[i]; | |
88 | BigInteger b = new BigInteger(temp); | |
89 | b = b.and(new BigInteger("ff", 16)); //$NON-NLS-1$ | |
90 | b = b.shiftLeft(i*8); | |
91 | value = value.or(b); | |
85 | for (int i = 0; i < 8; i += addressableSize) { | |
86 | for (int j = 0; j < addressableSize; j++) { | |
87 | byte[] temp = new byte[1]; | |
88 | temp[0] = array[i + j]; | |
89 | BigInteger b = new BigInteger(temp); | |
90 | b = b.and(new BigInteger("ff", 16)); //$NON-NLS-1$ | |
91 | b = b.shiftLeft((i + addressableSize - j - 1) * 8); | |
92 | value = value.or(b); | |
93 | } | |
92 | 94 | } |
93 | 95 | } |
94 | 96 | else |
110 | 112 | * Convert byte array to long. |
111 | 113 | * @param array |
112 | 114 | * @param endianess |
115 | * @param addressableSize | |
113 | 116 | * @return result of the conversion in long |
114 | 117 | */ |
115 | static public long convertByteArrayToLong(byte[] array, int endianess) | |
118 | static public long convertByteArrayToLong(byte[] array, int endianess, int addressableSize) | |
116 | 119 | { |
117 | 120 | if (array.length < 8) |
118 | 121 | { |
122 | 125 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
123 | 126 | { |
124 | 127 | long value = 0; |
125 | for (int i = 0; i < 8; i++) { | |
126 | long b = array[i]; | |
127 | b &= 0xff; | |
128 | value |= (b << (i * 8)); | |
128 | for (int i = 0; i < 8; i += addressableSize) { | |
129 | for (int j = 0; j < addressableSize; j++) { | |
130 | long b = array[i + j]; | |
131 | b &= 0xff; | |
132 | value |= (b << ((i + addressableSize - j - 1) * 8)); | |
133 | } | |
129 | 134 | } |
130 | 135 | return value; |
131 | 136 | } |
140 | 145 | return value; |
141 | 146 | } |
142 | 147 | |
143 | static public BigInteger convertByteArrayToSignedBigInt(byte[] array, int endianess) | |
148 | static public BigInteger convertByteArrayToSignedBigInt(byte[] array, int endianess, int addressableSize) | |
144 | 149 | { |
145 | 150 | if (array.length < 16) |
146 | 151 | { |
151 | 156 | { |
152 | 157 | // reverse bytes |
153 | 158 | byte[] holder = new byte[16]; |
154 | int j=15; | |
155 | for (int i=0; i<16; i++, j--) | |
156 | { | |
157 | holder[i] = array[j]; | |
159 | for (int i = 0; i < 16; i += addressableSize) { | |
160 | for (int j = 0; j < addressableSize; j++) { | |
161 | holder[i + j] = array[16 + j - i - addressableSize]; | |
162 | } | |
158 | 163 | } |
159 | 164 | |
160 | 165 | // create BigInteger |
165 | 170 | return value; |
166 | 171 | } |
167 | 172 | |
168 | static public BigInteger convertByteArrayToSignedBigInt(byte[] array, int endianess, int arraySize) | |
173 | static public BigInteger convertByteArrayToSignedBigInt(byte[] array, int endianess, int arraySize, int addressableSize) | |
169 | 174 | { |
170 | 175 | if (array.length < arraySize) |
171 | 176 | { |
176 | 181 | { |
177 | 182 | // reverse bytes |
178 | 183 | byte[] holder = new byte[arraySize]; |
179 | int j=arraySize-1; | |
180 | for (int i=0; i<arraySize; i++, j--) | |
181 | { | |
182 | holder[i] = array[j]; | |
184 | for (int i = 0; i < arraySize; i += addressableSize) { | |
185 | for (int j = 0; j < addressableSize; j++) { | |
186 | holder[i + j] = array[arraySize + j - i - addressableSize]; | |
187 | } | |
183 | 188 | } |
184 | 189 | |
185 | 190 | // create BigInteger |
190 | 195 | return value; |
191 | 196 | } |
192 | 197 | |
193 | static public BigInteger convertByteArrayToUnsignedBigInt(byte[] array, int endianess) | |
198 | static public BigInteger convertByteArrayToUnsignedBigInt(byte[] array, int endianess, int addressableSize) | |
194 | 199 | { |
195 | 200 | if (array.length < 16) |
196 | 201 | { |
200 | 205 | BigInteger value = new BigInteger("0"); //$NON-NLS-1$ |
201 | 206 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
202 | 207 | { |
203 | for (int i=0; i< 16; i++) | |
204 | { | |
205 | byte[] temp = new byte[1]; | |
206 | temp[0] = array[i]; | |
207 | BigInteger b = new BigInteger(temp); | |
208 | b = b.and(new BigInteger("ff", 16)); //$NON-NLS-1$ | |
209 | b = b.shiftLeft(i*8); | |
210 | value = value.or(b); | |
208 | for (int i = 0; i < 16; i += addressableSize) { | |
209 | for (int j = 0; j < addressableSize; j++) { | |
210 | byte[] temp = new byte[1]; | |
211 | temp[0] = array[i + j]; | |
212 | BigInteger b = new BigInteger(temp); | |
213 | b = b.and(new BigInteger("ff", 16)); //$NON-NLS-1$ | |
214 | b = b.shiftLeft((i + addressableSize - j - 1) * 8); | |
215 | value = value.or(b); | |
216 | } | |
211 | 217 | } |
212 | 218 | } |
213 | 219 | else |
225 | 231 | return value; |
226 | 232 | } |
227 | 233 | |
228 | static public BigInteger convertByteArrayToUnsignedBigInt(byte[] array, int endianess, int arraySize) | |
234 | static public BigInteger convertByteArrayToUnsignedBigInt(byte[] array, int endianess, int arraySize, int addressableSize) | |
229 | 235 | { |
230 | 236 | if (array.length < arraySize) |
231 | 237 | { |
235 | 241 | BigInteger value = new BigInteger("0"); //$NON-NLS-1$ |
236 | 242 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
237 | 243 | { |
238 | for (int i=0; i< arraySize; i++) | |
239 | { | |
240 | byte[] temp = new byte[1]; | |
241 | temp[0] = array[i]; | |
242 | BigInteger b = new BigInteger(temp); | |
243 | b = b.and(new BigInteger("ff", 16)); //$NON-NLS-1$ | |
244 | b = b.shiftLeft(i*8); | |
245 | value = value.or(b); | |
244 | for (int i = 0; i < arraySize; i += addressableSize) { | |
245 | for (int j = 0; j < addressableSize; j++) { | |
246 | byte[] temp = new byte[1]; | |
247 | temp[0] = array[i + j]; | |
248 | BigInteger b = new BigInteger(temp); | |
249 | b = b.and(new BigInteger("ff", 16)); //$NON-NLS-1$ | |
250 | b = b.shiftLeft((i + addressableSize - j - 1) * 8); | |
251 | value = value.or(b); | |
252 | } | |
246 | 253 | } |
247 | 254 | } |
248 | 255 | else |
264 | 271 | * Convert byte array to integer. |
265 | 272 | * @param array |
266 | 273 | * @param endianess |
274 | * @param addressableSize | |
267 | 275 | * @return result of the conversion in int |
268 | 276 | */ |
269 | static public int convertByteArrayToInt(byte[] array, int endianess) | |
277 | static public int convertByteArrayToInt(byte[] array, int endianess, int addressableSize) | |
270 | 278 | { |
271 | 279 | if (array.length < 4) |
272 | 280 | { |
276 | 284 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
277 | 285 | { |
278 | 286 | int value = 0; |
279 | for (int i = 0; i < 4; i++) { | |
280 | int b = array[i]; | |
281 | b &= 0xff; | |
282 | value |= (b << (i * 8)); | |
287 | for (int i = 0; i < 4; i += addressableSize) { | |
288 | for (int j = 0; j < addressableSize; j++) { | |
289 | int b = array[i + j]; | |
290 | b &= 0xff; | |
291 | value |= (b << ((i + addressableSize - j - 1) * 8)); | |
292 | } | |
283 | 293 | } |
284 | 294 | return value; |
285 | 295 | } |
298 | 308 | * Convert byte array to short. |
299 | 309 | * @param array |
300 | 310 | * @param endianess |
311 | * @param addressableSize | |
301 | 312 | * @return result of teh conversion in short |
302 | 313 | */ |
303 | static public short convertByteArrayToShort(byte[] array, int endianess) | |
314 | static public short convertByteArrayToShort(byte[] array, int endianess, int addressableSize) | |
304 | 315 | { |
305 | 316 | if (array.length < 2) |
306 | 317 | { |
310 | 321 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
311 | 322 | { |
312 | 323 | short value = 0; |
313 | for (int i = 0; i < 2; i++) { | |
314 | short b = array[i]; | |
315 | b &= 0xff; | |
316 | value |= (b << (i * 8)); | |
324 | for (int i = 0; i < 2; i += addressableSize) { | |
325 | for (int j = 0; j < addressableSize; j++) { | |
326 | short b = array[i + j]; | |
327 | b &= 0xff; | |
328 | value |= (b << ((i + addressableSize - j - 1) * 8)); | |
329 | } | |
317 | 330 | } |
318 | 331 | return value; |
319 | 332 | } |
331 | 344 | * Convert big integer to byte array. |
332 | 345 | * @param i |
333 | 346 | * @param endianess |
347 | * @param addressableSize | |
334 | 348 | * @return result of the conversion in raw byte array |
335 | 349 | */ |
336 | static public byte[] convertBigIntegerToByteArray(BigInteger i, int endianess) | |
350 | static public byte[] convertBigIntegerToByteArray(BigInteger i, int endianess, int addressableSize) | |
337 | 351 | { |
338 | 352 | byte buf[]=new byte[16]; |
339 | 353 | |
340 | 354 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
341 | 355 | { |
342 | for (int j=0; j<16; j++) | |
343 | { | |
344 | BigInteger x = i.shiftRight(j*8); | |
345 | buf[j] = x.byteValue(); | |
356 | for (int j = 0; j < 16; j += addressableSize) { | |
357 | for (int k = 0; k < addressableSize; k++) { | |
358 | BigInteger x = i.shiftRight((j + addressableSize - k - 1) * 8); | |
359 | buf[j + k] = x.byteValue(); | |
360 | } | |
346 | 361 | } |
347 | 362 | return buf; |
348 | 363 | } |
354 | 369 | return buf; |
355 | 370 | } |
356 | 371 | |
357 | static public byte[] convertSignedBigIntToByteArray(BigInteger i, int endianess, int arraySize) | |
372 | static public byte[] convertSignedBigIntToByteArray(BigInteger i, int endianess, int arraySize, int addressableSize) | |
358 | 373 | { |
359 | 374 | byte buf[]=new byte[arraySize]; |
360 | 375 | |
361 | 376 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
362 | 377 | { |
363 | for (int j=0; j<arraySize; j++) | |
364 | { | |
365 | BigInteger x = i.shiftRight(j*8); | |
366 | buf[j] = x.byteValue(); | |
378 | for (int j = 0; j < arraySize; j += addressableSize) { | |
379 | for (int k = 0; k < addressableSize; k++) { | |
380 | BigInteger x = i.shiftRight((j + addressableSize - k - 1) * 8); | |
381 | buf[j + k] = x.byteValue(); | |
382 | } | |
367 | 383 | } |
368 | 384 | return buf; |
369 | 385 | } |
379 | 395 | * Convert big integer to byte array. |
380 | 396 | * @param i |
381 | 397 | * @param endianess |
398 | * @param addressableSize | |
382 | 399 | * @return result of the conversion in raw byte array |
383 | 400 | */ |
384 | static public byte[] convertUnsignedBigIntegerToByteArray(BigInteger i, int endianess) | |
401 | static public byte[] convertUnsignedBigIntegerToByteArray(BigInteger i, int endianess, int addressableSize) | |
385 | 402 | { |
386 | 403 | byte buf[]=new byte[32]; |
387 | 404 | |
388 | 405 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
389 | 406 | { |
390 | for (int j=0; j<32; j++) | |
391 | { | |
392 | BigInteger x = i.shiftRight(j*8); | |
393 | buf[j] = x.byteValue(); | |
407 | for (int j = 0; j < 32; j += addressableSize) { | |
408 | for (int k = 0; k < addressableSize; k++) { | |
409 | BigInteger x = i.shiftRight((j + addressableSize - k - 1) * 8); | |
410 | buf[j + k] = x.byteValue(); | |
411 | } | |
394 | 412 | } |
395 | 413 | return buf; |
396 | 414 | } |
402 | 420 | return buf; |
403 | 421 | } |
404 | 422 | |
405 | static public byte[] convertUnsignedBigIntToByteArray(BigInteger i, int endianess, int arraySize) | |
423 | static public byte[] convertUnsignedBigIntToByteArray(BigInteger i, int endianess, int arraySize, int addressableSize) | |
406 | 424 | { |
407 | 425 | byte buf[]=new byte[arraySize*2]; |
408 | 426 | |
409 | 427 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
410 | 428 | { |
411 | for (int j=0; j<arraySize*2; j++) | |
412 | { | |
413 | BigInteger x = i.shiftRight(j*8); | |
414 | buf[j] = x.byteValue(); | |
429 | for (int j = 0; j < arraySize * 2; j += addressableSize) { | |
430 | for (int k = 0; k < addressableSize; k++) { | |
431 | BigInteger x = i.shiftRight((j + addressableSize - k - 1) * 8); | |
432 | buf[j + k] = x.byteValue(); | |
433 | } | |
415 | 434 | } |
416 | 435 | return buf; |
417 | 436 | } |
427 | 446 | * Convert long to byte array. |
428 | 447 | * @param i |
429 | 448 | * @param endianess |
449 | * @param addressableSize | |
430 | 450 | * @return result of the conversion in raw byte array |
431 | 451 | */ |
432 | static public byte[] convertLongToByteArray(long i, int endianess) | |
452 | static public byte[] convertLongToByteArray(long i, int endianess, int addressableSize) | |
433 | 453 | { |
434 | 454 | byte buf[]=new byte[8]; |
435 | 455 | |
436 | 456 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
437 | 457 | { |
438 | for (int j=0; j<8; j++) | |
439 | { | |
440 | buf[j] = Long.valueOf(i>>j*8).byteValue(); | |
458 | for (int j = 0; j < 8; j += addressableSize) { | |
459 | for (int k = 0; k < addressableSize; k++) { | |
460 | buf[j + k] = Long.valueOf(i >> (j + addressableSize - k - 1) * 8).byteValue(); | |
461 | } | |
441 | 462 | } |
442 | 463 | return buf; |
443 | 464 | } |
452 | 473 | * Convert integer to byte array. |
453 | 474 | * @param i |
454 | 475 | * @param endianess |
476 | * @param addressableSize | |
455 | 477 | * @return result of the conversion in raw byte array |
456 | 478 | */ |
457 | static public byte[] convertIntToByteArray(int i, int endianess) | |
479 | static public byte[] convertIntToByteArray(int i, int endianess, int addressableSize) | |
458 | 480 | { |
459 | 481 | byte buf[]=new byte[4]; |
460 | 482 | |
461 | 483 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
462 | 484 | { |
463 | for (int j=0; j<4; j++) | |
464 | { | |
465 | buf[j] = Integer.valueOf(i>>j*8).byteValue(); | |
485 | for (int j = 0; j < 4; j += addressableSize) { | |
486 | for (int k = 0; k < addressableSize; k++) { | |
487 | buf[j + k] = Integer.valueOf(i >> (j + addressableSize - k - 1) * 8).byteValue(); | |
488 | } | |
466 | 489 | } |
467 | 490 | return buf; |
468 | 491 | } |
477 | 500 | * Convert short to byte array. |
478 | 501 | * @param i |
479 | 502 | * @param endianess |
503 | * @param addressableSize | |
480 | 504 | * @return result of the conversion in raw byte array |
481 | 505 | */ |
482 | static public byte[] convertShortToByteArray(short i, int endianess) | |
506 | static public byte[] convertShortToByteArray(short i, int endianess, int addressableSize) | |
483 | 507 | { |
484 | 508 | byte buf[]=new byte[2]; |
485 | 509 | |
486 | 510 | if (endianess == RenderingsUtil.LITTLE_ENDIAN) |
487 | 511 | { |
488 | for (short j=0; j<2; j++) | |
489 | { | |
490 | buf[j] = Integer.valueOf(i>>j*8).byteValue(); | |
512 | for (short j = 0; j < 2; j += addressableSize) { | |
513 | for (int k = 0; k < addressableSize; k++) { | |
514 | buf[j + k] = Integer.valueOf(i >> (j + addressableSize - k - 1) * 8).byteValue(); | |
515 | } | |
491 | 516 | } |
492 | 517 | return buf; |
493 | 518 | } |
+12
-11
0 | 0 | /******************************************************************************* |
1 | * Copyright (c) 2004, 2005 IBM Corporation and others. | |
1 | * Copyright (c) 2004, 2021 IBM Corporation and others. | |
2 | 2 | * |
3 | 3 | * This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License 2.0 |
9 | 9 | * |
10 | 10 | * Contributors: |
11 | 11 | * IBM Corporation - initial API and implementation |
12 | * John Dallaway - Accommodate addressableSize != 1 (bug 577106) | |
12 | 13 | *******************************************************************************/ |
13 | 14 | package org.eclipse.debug.internal.ui.views.memory.renderings; |
14 | 15 | |
46 | 47 | result = byteArray[0]; |
47 | 48 | break; |
48 | 49 | case 2: |
49 | result = RenderingsUtil.convertByteArrayToShort(byteArray, endianess); | |
50 | result = RenderingsUtil.convertByteArrayToShort(byteArray, endianess, getAddressableSize()); | |
50 | 51 | break; |
51 | 52 | case 4: |
52 | result = RenderingsUtil.convertByteArrayToInt(byteArray, endianess); | |
53 | result = RenderingsUtil.convertByteArrayToInt(byteArray, endianess, getAddressableSize()); | |
53 | 54 | break; |
54 | 55 | case 8: |
55 | result = RenderingsUtil.convertByteArrayToLong(byteArray, endianess); | |
56 | result = RenderingsUtil.convertByteArrayToLong(byteArray, endianess, getAddressableSize()); | |
56 | 57 | break; |
57 | 58 | case 16: |
58 | 59 | { |
59 | BigInteger bigRet = RenderingsUtil.convertByteArrayToSignedBigInt(byteArray, endianess); | |
60 | BigInteger bigRet = RenderingsUtil.convertByteArrayToSignedBigInt(byteArray, endianess, getAddressableSize()); | |
60 | 61 | return bigRet.toString(); |
61 | 62 | } |
62 | 63 | default: |
63 | 64 | { |
64 | BigInteger bigRet = RenderingsUtil.convertByteArrayToSignedBigInt(byteArray, endianess, columnSize); | |
65 | BigInteger bigRet = RenderingsUtil.convertByteArrayToSignedBigInt(byteArray, endianess, columnSize, getAddressableSize()); | |
65 | 66 | return bigRet.toString(); |
66 | 67 | } |
67 | 68 | } |
84 | 85 | case 2: |
85 | 86 | { |
86 | 87 | short i = Short.parseShort(newValue); |
87 | bytes = RenderingsUtil.convertShortToByteArray(i, endianess); | |
88 | bytes = RenderingsUtil.convertShortToByteArray(i, endianess, getAddressableSize()); | |
88 | 89 | break; |
89 | 90 | } |
90 | 91 | case 4: |
91 | 92 | { |
92 | 93 | int i = Integer.parseInt(newValue); |
93 | bytes = RenderingsUtil.convertIntToByteArray(i, endianess); | |
94 | bytes = RenderingsUtil.convertIntToByteArray(i, endianess, getAddressableSize()); | |
94 | 95 | break; |
95 | 96 | } |
96 | 97 | case 8: |
97 | 98 | { |
98 | 99 | long i = Long.parseLong(newValue); |
99 | bytes = RenderingsUtil.convertLongToByteArray(i, endianess); | |
100 | bytes = RenderingsUtil.convertLongToByteArray(i, endianess, getAddressableSize()); | |
100 | 101 | break; |
101 | 102 | } |
102 | 103 | case 16: |
104 | 105 | // special case for colSize == 16 |
105 | 106 | // need to represent number in Big Integer |
106 | 107 | BigInteger i = new BigInteger(newValue); |
107 | bytes = RenderingsUtil.convertBigIntegerToByteArray(i, endianess); | |
108 | bytes = RenderingsUtil.convertBigIntegerToByteArray(i, endianess, getAddressableSize()); | |
108 | 109 | |
109 | 110 | return bytes; |
110 | 111 | } |
127 | 128 | throw new NumberFormatException(); |
128 | 129 | } |
129 | 130 | |
130 | bytes = RenderingsUtil.convertSignedBigIntToByteArray(i, endianess, colSize); | |
131 | bytes = RenderingsUtil.convertSignedBigIntToByteArray(i, endianess, colSize, getAddressableSize()); | |
131 | 132 | return bytes; |
132 | 133 | } |
133 | 134 | } |
+13
-12
0 | 0 | /******************************************************************************* |
1 | * Copyright (c) 2004, 2005 IBM Corporation and others. | |
1 | * Copyright (c) 2004, 2021 IBM Corporation and others. | |
2 | 2 | * |
3 | 3 | * This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License 2.0 |
9 | 9 | * |
10 | 10 | * Contributors: |
11 | 11 | * IBM Corporation - initial API and implementation |
12 | * John Dallaway - Accommodate addressableSize != 1 (bug 577106) | |
12 | 13 | *******************************************************************************/ |
13 | 14 | package org.eclipse.debug.internal.ui.views.memory.renderings; |
14 | 15 | |
42 | 43 | result &= 0xff; |
43 | 44 | break; |
44 | 45 | case 2: |
45 | result = RenderingsUtil.convertByteArrayToInt(byteArray, endianess); | |
46 | result = RenderingsUtil.convertByteArrayToInt(byteArray, endianess, getAddressableSize()); | |
46 | 47 | break; |
47 | 48 | case 4: |
48 | result = RenderingsUtil.convertByteArrayToLong(byteArray, endianess); | |
49 | result = RenderingsUtil.convertByteArrayToLong(byteArray, endianess, getAddressableSize()); | |
49 | 50 | break; |
50 | 51 | case 8: |
51 | BigInteger value = RenderingsUtil.convertByteArrayToUnsignedLong(byteArray, endianess); | |
52 | BigInteger value = RenderingsUtil.convertByteArrayToUnsignedLong(byteArray, endianess, getAddressableSize()); | |
52 | 53 | return value.toString(); |
53 | 54 | case 16: |
54 | 55 | { |
55 | BigInteger bigRet = RenderingsUtil.convertByteArrayToUnsignedBigInt(byteArray, endianess); | |
56 | BigInteger bigRet = RenderingsUtil.convertByteArrayToUnsignedBigInt(byteArray, endianess, getAddressableSize()); | |
56 | 57 | return bigRet.toString(); |
57 | 58 | } |
58 | 59 | default: |
59 | 60 | { |
60 | BigInteger bigRet = RenderingsUtil.convertByteArrayToUnsignedBigInt(byteArray, endianess, columnSize); | |
61 | BigInteger bigRet = RenderingsUtil.convertByteArrayToUnsignedBigInt(byteArray, endianess, columnSize, getAddressableSize()); | |
61 | 62 | return bigRet.toString(); |
62 | 63 | } |
63 | 64 | } |
75 | 76 | case 1: |
76 | 77 | { |
77 | 78 | short i = Short.parseShort(newValue); |
78 | bytes = RenderingsUtil.convertShortToByteArray(i, endianess); | |
79 | bytes = RenderingsUtil.convertShortToByteArray(i, endianess, getAddressableSize()); | |
79 | 80 | bytes = extractBytes(bytes, endianess, colSize); |
80 | 81 | break; |
81 | 82 | } |
83 | 84 | case 2: |
84 | 85 | { |
85 | 86 | int i = Integer.parseInt(newValue); |
86 | bytes = RenderingsUtil.convertIntToByteArray(i, endianess); | |
87 | bytes = RenderingsUtil.convertIntToByteArray(i, endianess, getAddressableSize()); | |
87 | 88 | bytes = extractBytes(bytes, endianess, colSize); |
88 | 89 | break; |
89 | 90 | } |
90 | 91 | case 4: |
91 | 92 | { |
92 | 93 | long i = Long.parseLong(newValue); |
93 | bytes = RenderingsUtil.convertLongToByteArray(i, endianess); | |
94 | bytes = RenderingsUtil.convertLongToByteArray(i, endianess, getAddressableSize()); | |
94 | 95 | bytes = extractBytes(bytes, endianess, colSize); |
95 | 96 | break; |
96 | 97 | } |
97 | 98 | case 8: |
98 | 99 | { |
99 | 100 | BigInteger i = new BigInteger(newValue); |
100 | bytes = RenderingsUtil.convertBigIntegerToByteArray(i, endianess); | |
101 | bytes = RenderingsUtil.convertBigIntegerToByteArray(i, endianess, getAddressableSize()); | |
101 | 102 | bytes = extractBytes(bytes, endianess, colSize); |
102 | 103 | break; |
103 | 104 | } |
104 | 105 | case 16: |
105 | 106 | { |
106 | 107 | BigInteger i = new BigInteger(newValue); |
107 | bytes = RenderingsUtil.convertUnsignedBigIntegerToByteArray(i, endianess); | |
108 | bytes = RenderingsUtil.convertUnsignedBigIntegerToByteArray(i, endianess, getAddressableSize()); | |
108 | 109 | bytes = extractBytes(bytes, endianess, colSize); |
109 | 110 | |
110 | 111 | return bytes; |
112 | 113 | default: |
113 | 114 | { |
114 | 115 | BigInteger i = new BigInteger(newValue); |
115 | bytes = RenderingsUtil.convertUnsignedBigIntToByteArray(i, endianess, colSize); | |
116 | bytes = RenderingsUtil.convertUnsignedBigIntToByteArray(i, endianess, colSize, getAddressableSize()); | |
116 | 117 | bytes = extractBytes(bytes, endianess, colSize); |
117 | 118 | return bytes; |
118 | 119 | } |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <classpath> | |
2 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> | |
3 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | |
4 | <classpathentry kind="src" path="src"/> | |
5 | <classpathentry kind="output" path="bin"/> | |
6 | </classpath> |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <projectDescription> | |
2 | <name>org.eclipse.debug.ui.launchview</name> | |
3 | <comment></comment> | |
4 | <projects> | |
5 | </projects> | |
6 | <buildSpec> | |
7 | <buildCommand> | |
8 | <name>org.eclipse.jdt.core.javabuilder</name> | |
9 | <arguments> | |
10 | </arguments> | |
11 | </buildCommand> | |
12 | <buildCommand> | |
13 | <name>org.eclipse.pde.ManifestBuilder</name> | |
14 | <arguments> | |
15 | </arguments> | |
16 | </buildCommand> | |
17 | <buildCommand> | |
18 | <name>org.eclipse.pde.SchemaBuilder</name> | |
19 | <arguments> | |
20 | </arguments> | |
21 | </buildCommand> | |
22 | <buildCommand> | |
23 | <name>org.eclipse.pde.ds.core.builder</name> | |
24 | <arguments> | |
25 | </arguments> | |
26 | </buildCommand> | |
27 | </buildSpec> | |
28 | <natures> | |
29 | <nature>org.eclipse.jdt.core.javanature</nature> | |
30 | <nature>org.eclipse.pde.PluginNature</nature> | |
31 | </natures> | |
32 | </projectDescription> |
0 | eclipse.preferences.version=1 | |
1 | encoding//ui/org/eclipse/debug/internal/ui/elements/adapters/Messages.properties=8859_1 | |
2 | encoding//ui/org/eclipse/debug/internal/ui/importexport/breakpoints/BreakpointImportExport.properties=8859_1 | |
3 | encoding/<project>=UTF-8 |
0 | eclipse.preferences.version=1 | |
1 | org.eclipse.jdt.core.builder.cleanOutputFolder=clean | |
2 | org.eclipse.jdt.core.builder.duplicateResourceTask=warning | |
3 | org.eclipse.jdt.core.builder.invalidClasspath=abort | |
4 | org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore | |
5 | org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch | |
6 | org.eclipse.jdt.core.circularClasspath=error | |
7 | org.eclipse.jdt.core.classpath.exclusionPatterns=enabled | |
8 | org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled | |
9 | org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error | |
10 | org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled | |
11 | org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore | |
12 | org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull | |
13 | org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= | |
14 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault | |
15 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= | |
16 | org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable | |
17 | org.eclipse.jdt.core.compiler.annotation.nullable.secondary= | |
18 | org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled | |
19 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | |
20 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | |
21 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | |
22 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | |
23 | org.eclipse.jdt.core.compiler.compliance=11 | |
24 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate | |
25 | org.eclipse.jdt.core.compiler.debug.localVariable=generate | |
26 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate | |
27 | org.eclipse.jdt.core.compiler.doc.comment.support=enabled | |
28 | org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 | |
29 | org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning | |
30 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | |
31 | org.eclipse.jdt.core.compiler.problem.autoboxing=ignore | |
32 | org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning | |
33 | org.eclipse.jdt.core.compiler.problem.deadCode=warning | |
34 | org.eclipse.jdt.core.compiler.problem.deprecation=warning | |
35 | org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled | |
36 | org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled | |
37 | org.eclipse.jdt.core.compiler.problem.discouragedReference=warning | |
38 | org.eclipse.jdt.core.compiler.problem.emptyStatement=warning | |
39 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | |
40 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | |
41 | org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning | |
42 | org.eclipse.jdt.core.compiler.problem.fallthroughCase=error | |
43 | org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled | |
44 | org.eclipse.jdt.core.compiler.problem.fieldHiding=warning | |
45 | org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore | |
46 | org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning | |
47 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore | |
48 | org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning | |
49 | org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled | |
50 | org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning | |
51 | org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error | |
52 | org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning | |
53 | org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore | |
54 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled | |
55 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled | |
56 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled | |
57 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private | |
58 | org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning | |
59 | org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning | |
60 | org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning | |
61 | org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning | |
62 | org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled | |
63 | org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning | |
64 | org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore | |
65 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled | |
66 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public | |
67 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags | |
68 | org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore | |
69 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled | |
70 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled | |
71 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private | |
72 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning | |
73 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled | |
74 | org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning | |
75 | org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore | |
76 | org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning | |
77 | org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning | |
78 | org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error | |
79 | org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning | |
80 | org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning | |
81 | org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error | |
82 | org.eclipse.jdt.core.compiler.problem.nullReference=error | |
83 | org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error | |
84 | org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning | |
85 | org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning | |
86 | org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning | |
87 | org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning | |
88 | org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning | |
89 | org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning | |
90 | org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning | |
91 | org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning | |
92 | org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning | |
93 | org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore | |
94 | org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore | |
95 | org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore | |
96 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore | |
97 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore | |
98 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | |
99 | org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled | |
100 | org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning | |
101 | org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled | |
102 | org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled | |
103 | org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled | |
104 | org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore | |
105 | org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning | |
106 | org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled | |
107 | org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning | |
108 | org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning | |
109 | org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore | |
110 | org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error | |
111 | org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore | |
112 | org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error | |
113 | org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore | |
114 | org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning | |
115 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning | |
116 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled | |
117 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled | |
118 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled | |
119 | org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore | |
120 | org.eclipse.jdt.core.compiler.problem.unusedImport=error | |
121 | org.eclipse.jdt.core.compiler.problem.unusedLabel=warning | |
122 | org.eclipse.jdt.core.compiler.problem.unusedLocal=warning | |
123 | org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore | |
124 | org.eclipse.jdt.core.compiler.problem.unusedParameter=warning | |
125 | org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled | |
126 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled | |
127 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled | |
128 | org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error | |
129 | org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore | |
130 | org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning | |
131 | org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning | |
132 | org.eclipse.jdt.core.compiler.release=enabled | |
133 | org.eclipse.jdt.core.compiler.source=11 | |
134 | org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled | |
135 | org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH | |
136 | org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING | |
137 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false | |
138 | org.eclipse.jdt.core.formatter.alignment_for_additive_operator=0 | |
139 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 | |
140 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 | |
141 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 | |
142 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0 | |
143 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0 | |
144 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0 | |
145 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0 | |
146 | org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=0 | |
147 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 | |
148 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 | |
149 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 | |
150 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=32 | |
151 | org.eclipse.jdt.core.formatter.alignment_for_logical_operator=0 | |
152 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 | |
153 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 | |
154 | org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=0 | |
155 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0 | |
156 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0 | |
157 | org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=0 | |
158 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0 | |
159 | org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=0 | |
160 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 | |
161 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 | |
162 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 | |
163 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0 | |
164 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 | |
165 | org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=0 | |
166 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 | |
167 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1 | |
168 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0 | |
169 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 | |
170 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 | |
171 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 | |
172 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1 | |
173 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 | |
174 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0 | |
175 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 | |
176 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 | |
177 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line | |
178 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line | |
179 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line | |
180 | org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line | |
181 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line | |
182 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line | |
183 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line | |
184 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line | |
185 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line | |
186 | org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line | |
187 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line | |
188 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true | |
189 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false | |
190 | org.eclipse.jdt.core.formatter.comment.format_block_comments=true | |
191 | org.eclipse.jdt.core.formatter.comment.format_header=false | |
192 | org.eclipse.jdt.core.formatter.comment.format_html=true | |
193 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true | |
194 | org.eclipse.jdt.core.formatter.comment.format_line_comments=true | |
195 | org.eclipse.jdt.core.formatter.comment.format_source_code=true | |
196 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true | |
197 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=true | |
198 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert | |
199 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert | |
200 | org.eclipse.jdt.core.formatter.comment.line_length=80 | |
201 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true | |
202 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true | |
203 | org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false | |
204 | org.eclipse.jdt.core.formatter.compact_else_if=true | |
205 | org.eclipse.jdt.core.formatter.continuation_indentation=2 | |
206 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 | |
207 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off | |
208 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on | |
209 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false | |
210 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true | |
211 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true | |
212 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true | |
213 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true | |
214 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true | |
215 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true | |
216 | org.eclipse.jdt.core.formatter.indent_empty_lines=false | |
217 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true | |
218 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true | |
219 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true | |
220 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true | |
221 | org.eclipse.jdt.core.formatter.indentation.size=4 | |
222 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert | |
223 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert | |
224 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert | |
225 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert | |
226 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert | |
227 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert | |
228 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert | |
229 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert | |
230 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert | |
231 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert | |
232 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert | |
233 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert | |
234 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert | |
235 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert | |
236 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert | |
237 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert | |
238 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert | |
239 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert | |
240 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert | |
241 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert | |
242 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert | |
243 | org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert | |
244 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert | |
245 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert | |
246 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert | |
247 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert | |
248 | org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert | |
249 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert | |
250 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert | |
251 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert | |
252 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert | |
253 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert | |
254 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert | |
255 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert | |
256 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert | |
257 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert | |
258 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert | |
259 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert | |
260 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert | |
261 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert | |
262 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert | |
263 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert | |
264 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert | |
265 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert | |
266 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert | |
267 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert | |
268 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert | |
269 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert | |
270 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert | |
271 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert | |
272 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert | |
273 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert | |
274 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert | |
275 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert | |
276 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert | |
277 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert | |
278 | org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert | |
279 | org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert | |
280 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert | |
281 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert | |
282 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert | |
283 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert | |
284 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert | |
285 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert | |
286 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert | |
287 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert | |
288 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert | |
289 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert | |
290 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert | |
291 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert | |
292 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert | |
293 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert | |
294 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert | |
295 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert | |
296 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert | |
297 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert | |
298 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert | |
299 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert | |
300 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert | |
301 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert | |
302 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert | |
303 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert | |
304 | org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert | |
305 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert | |
306 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert | |
307 | org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert | |
308 | org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert | |
309 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert | |
310 | org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert | |
311 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert | |
312 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert | |
313 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert | |
314 | org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert | |
315 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert | |
316 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert | |
317 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert | |
318 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert | |
319 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert | |
320 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert | |
321 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert | |
322 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert | |
323 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert | |
324 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert | |
325 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert | |
326 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert | |
327 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert | |
328 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert | |
329 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert | |
330 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert | |
331 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert | |
332 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert | |
333 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert | |
334 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert | |
335 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert | |
336 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert | |
337 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert | |
338 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert | |
339 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert | |
340 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert | |
341 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert | |
342 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert | |
343 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert | |
344 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert | |
345 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert | |
346 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert | |
347 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert | |
348 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert | |
349 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert | |
350 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert | |
351 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert | |
352 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert | |
353 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert | |
354 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert | |
355 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert | |
356 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert | |
357 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert | |
358 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert | |
359 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert | |
360 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert | |
361 | org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert | |
362 | org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert | |
363 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert | |
364 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert | |
365 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert | |
366 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert | |
367 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert | |
368 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert | |
369 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert | |
370 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert | |
371 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert | |
372 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert | |
373 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert | |
374 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert | |
375 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert | |
376 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert | |
377 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert | |
378 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert | |
379 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert | |
380 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert | |
381 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert | |
382 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert | |
383 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert | |
384 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert | |
385 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert | |
386 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert | |
387 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert | |
388 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert | |
389 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert | |
390 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert | |
391 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert | |
392 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert | |
393 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert | |
394 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert | |
395 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert | |
396 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert | |
397 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert | |
398 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert | |
399 | org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert | |
400 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert | |
401 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert | |
402 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert | |
403 | org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert | |
404 | org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert | |
405 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert | |
406 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert | |
407 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert | |
408 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert | |
409 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert | |
410 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert | |
411 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert | |
412 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert | |
413 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert | |
414 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true | |
415 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true | |
416 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false | |
417 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false | |
418 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false | |
419 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false | |
420 | org.eclipse.jdt.core.formatter.lineSplit=80 | |
421 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false | |
422 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false | |
423 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 | |
424 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 | |
425 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true | |
426 | org.eclipse.jdt.core.formatter.tabulation.char=tab | |
427 | org.eclipse.jdt.core.formatter.tabulation.size=4 | |
428 | org.eclipse.jdt.core.formatter.use_on_off_tags=false | |
429 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false | |
430 | org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true | |
431 | org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true | |
432 | org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true | |
433 | org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true | |
434 | org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true | |
435 | org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true | |
436 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true | |
437 | org.eclipse.jdt.core.incompatibleJDKLevel=ignore | |
438 | org.eclipse.jdt.core.incompleteClasspath=error |
0 | cleanup.add_default_serial_version_id=true | |
1 | cleanup.add_generated_serial_version_id=false | |
2 | cleanup.add_missing_annotations=true | |
3 | cleanup.add_missing_deprecated_annotations=true | |
4 | cleanup.add_missing_methods=false | |
5 | cleanup.add_missing_nls_tags=false | |
6 | cleanup.add_missing_override_annotations=true | |
7 | cleanup.add_missing_override_annotations_interface_methods=true | |
8 | cleanup.add_serial_version_id=false | |
9 | cleanup.always_use_blocks=true | |
10 | cleanup.always_use_parentheses_in_expressions=false | |
11 | cleanup.always_use_this_for_non_static_field_access=false | |
12 | cleanup.always_use_this_for_non_static_method_access=false | |
13 | cleanup.convert_to_enhanced_for_loop=false | |
14 | cleanup.correct_indentation=false | |
15 | cleanup.format_source_code=true | |
16 | cleanup.format_source_code_changes_only=false | |
17 | cleanup.make_local_variable_final=true | |
18 | cleanup.make_parameters_final=false | |
19 | cleanup.make_private_fields_final=true | |
20 | cleanup.make_type_abstract_if_missing_method=false | |
21 | cleanup.make_variable_declarations_final=false | |
22 | cleanup.never_use_blocks=false | |
23 | cleanup.never_use_parentheses_in_expressions=true | |
24 | cleanup.organize_imports=true | |
25 | cleanup.qualify_static_field_accesses_with_declaring_class=false | |
26 | cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true | |
27 | cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true | |
28 | cleanup.qualify_static_member_accesses_with_declaring_class=true | |
29 | cleanup.qualify_static_method_accesses_with_declaring_class=false | |
30 | cleanup.remove_private_constructors=true | |
31 | cleanup.remove_trailing_whitespaces=true | |
32 | cleanup.remove_trailing_whitespaces_all=true | |
33 | cleanup.remove_trailing_whitespaces_ignore_empty=false | |
34 | cleanup.remove_unnecessary_casts=true | |
35 | cleanup.remove_unnecessary_nls_tags=true | |
36 | cleanup.remove_unused_imports=true | |
37 | cleanup.remove_unused_local_variables=false | |
38 | cleanup.remove_unused_private_fields=true | |
39 | cleanup.remove_unused_private_members=false | |
40 | cleanup.remove_unused_private_methods=true | |
41 | cleanup.remove_unused_private_types=true | |
42 | cleanup.sort_members=false | |
43 | cleanup.sort_members_all=false | |
44 | cleanup.use_blocks=true | |
45 | cleanup.use_blocks_only_for_return_and_throw=false | |
46 | cleanup.use_parentheses_in_expressions=false | |
47 | cleanup.use_this_for_non_static_field_access=false | |
48 | cleanup.use_this_for_non_static_field_access_only_if_necessary=true | |
49 | cleanup.use_this_for_non_static_method_access=false | |
50 | cleanup.use_this_for_non_static_method_access_only_if_necessary=true | |
51 | cleanup_profile=_Platform Debug Cleanups | |
52 | cleanup_settings_version=2 | |
53 | eclipse.preferences.version=1 | |
54 | editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true | |
55 | formatter_profile=_Platform Debug Formatting | |
56 | formatter_settings_version=12 | |
57 | sp_cleanup.add_default_serial_version_id=true | |
58 | sp_cleanup.add_generated_serial_version_id=false | |
59 | sp_cleanup.add_missing_annotations=true | |
60 | sp_cleanup.add_missing_deprecated_annotations=true | |
61 | sp_cleanup.add_missing_methods=false | |
62 | sp_cleanup.add_missing_nls_tags=false | |
63 | sp_cleanup.add_missing_override_annotations=true | |
64 | sp_cleanup.add_missing_override_annotations_interface_methods=true | |
65 | sp_cleanup.add_serial_version_id=false | |
66 | sp_cleanup.always_use_blocks=true | |
67 | sp_cleanup.always_use_parentheses_in_expressions=false | |
68 | sp_cleanup.always_use_this_for_non_static_field_access=false | |
69 | sp_cleanup.always_use_this_for_non_static_method_access=false | |
70 | sp_cleanup.convert_functional_interfaces=false | |
71 | sp_cleanup.convert_to_enhanced_for_loop=false | |
72 | sp_cleanup.correct_indentation=false | |
73 | sp_cleanup.format_source_code=true | |
74 | sp_cleanup.format_source_code_changes_only=true | |
75 | sp_cleanup.insert_inferred_type_arguments=false | |
76 | sp_cleanup.make_local_variable_final=false | |
77 | sp_cleanup.make_parameters_final=false | |
78 | sp_cleanup.make_private_fields_final=true | |
79 | sp_cleanup.make_type_abstract_if_missing_method=false | |
80 | sp_cleanup.make_variable_declarations_final=false | |
81 | sp_cleanup.never_use_blocks=false | |
82 | sp_cleanup.never_use_parentheses_in_expressions=true | |
83 | sp_cleanup.on_save_use_additional_actions=true | |
84 | sp_cleanup.organize_imports=true | |
85 | sp_cleanup.qualify_static_field_accesses_with_declaring_class=false | |
86 | sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true | |
87 | sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true | |
88 | sp_cleanup.qualify_static_member_accesses_with_declaring_class=false | |
89 | sp_cleanup.qualify_static_method_accesses_with_declaring_class=false | |
90 | sp_cleanup.remove_private_constructors=true | |
91 | sp_cleanup.remove_redundant_type_arguments=false | |
92 | sp_cleanup.remove_trailing_whitespaces=true | |
93 | sp_cleanup.remove_trailing_whitespaces_all=true | |
94 | sp_cleanup.remove_trailing_whitespaces_ignore_empty=false | |
95 | sp_cleanup.remove_unnecessary_casts=true | |
96 | sp_cleanup.remove_unnecessary_nls_tags=true | |
97 | sp_cleanup.remove_unused_imports=true | |
98 | sp_cleanup.remove_unused_local_variables=false | |
99 | sp_cleanup.remove_unused_private_fields=true | |
100 | sp_cleanup.remove_unused_private_members=false | |
101 | sp_cleanup.remove_unused_private_methods=true | |
102 | sp_cleanup.remove_unused_private_types=true | |
103 | sp_cleanup.sort_members=false | |
104 | sp_cleanup.sort_members_all=false | |
105 | sp_cleanup.use_anonymous_class_creation=false | |
106 | sp_cleanup.use_blocks=true | |
107 | sp_cleanup.use_blocks_only_for_return_and_throw=false | |
108 | sp_cleanup.use_lambda=false | |
109 | sp_cleanup.use_parentheses_in_expressions=false | |
110 | sp_cleanup.use_this_for_non_static_field_access=false | |
111 | sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true | |
112 | sp_cleanup.use_this_for_non_static_method_access=false | |
113 | sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true |
0 | ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error | |
1 | ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error | |
2 | ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error | |
3 | ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error | |
4 | ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error | |
5 | API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error | |
6 | API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error | |
7 | API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error | |
8 | API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error | |
9 | API_USE_SCAN_FIELD_SEVERITY=Error | |
10 | API_USE_SCAN_METHOD_SEVERITY=Error | |
11 | API_USE_SCAN_TYPE_SEVERITY=Error | |
12 | CLASS_ELEMENT_TYPE_ADDED_METHOD=Error | |
13 | CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error | |
14 | CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error | |
15 | CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error | |
16 | CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error | |
17 | CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error | |
18 | CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error | |
19 | CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error | |
20 | CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error | |
21 | CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error | |
22 | CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error | |
23 | CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error | |
24 | CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error | |
25 | CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error | |
26 | CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error | |
27 | CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error | |
28 | CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error | |
29 | CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error | |
30 | ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error | |
31 | ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error | |
32 | ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error | |
33 | ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error | |
34 | ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error | |
35 | ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error | |
36 | FIELD_ELEMENT_TYPE_ADDED_VALUE=Error | |
37 | FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error | |
38 | FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error | |
39 | FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error | |
40 | FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error | |
41 | FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error | |
42 | FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error | |
43 | FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error | |
44 | FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error | |
45 | FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error | |
46 | ILLEGAL_EXTEND=Warning | |
47 | ILLEGAL_IMPLEMENT=Warning | |
48 | ILLEGAL_INSTANTIATE=Warning | |
49 | ILLEGAL_OVERRIDE=Warning | |
50 | ILLEGAL_REFERENCE=Warning | |
51 | INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error | |
52 | INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error | |
53 | INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error | |
54 | INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error | |
55 | INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error | |
56 | INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error | |
57 | INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error | |
58 | INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error | |
59 | INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error | |
60 | INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error | |
61 | INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error | |
62 | INVALID_JAVADOC_TAG=Warning | |
63 | INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning | |
64 | LEAK_EXTEND=Warning | |
65 | LEAK_FIELD_DECL=Warning | |
66 | LEAK_IMPLEMENT=Warning | |
67 | LEAK_METHOD_PARAM=Warning | |
68 | LEAK_METHOD_RETURN_TYPE=Warning | |
69 | METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error | |
70 | METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error | |
71 | METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error | |
72 | METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error | |
73 | METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error | |
74 | METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error | |
75 | METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error | |
76 | METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error | |
77 | METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error | |
78 | METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error | |
79 | MISSING_EE_DESCRIPTIONS=Warning | |
80 | TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error | |
81 | TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error | |
82 | TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error | |
83 | TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error | |
84 | TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error | |
85 | TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error | |
86 | UNUSED_PROBLEM_FILTERS=Warning | |
87 | automatically_removed_unused_problem_filters=false | |
88 | eclipse.preferences.version=1 | |
89 | incompatible_api_component_version=Error | |
90 | incompatible_api_component_version_include_major_without_breaking_change=Disabled | |
91 | incompatible_api_component_version_include_minor_without_api_change=Disabled | |
92 | invalid_since_tag_version=Error | |
93 | malformed_since_tag=Error | |
94 | missing_since_tag=Error | |
95 | report_api_breakage_when_major_version_incremented=Disabled | |
96 | report_resolution_errors_api_component=Warning |
0 | eclipse.preferences.version=1 | |
1 | enabled=true | |
2 | generateBundleActivationPolicyLazy=true | |
3 | path=OSGI-INF | |
4 | validationErrorLevel=error | |
5 | validationErrorLevel.missingImplicitUnbindMethod=error |
0 | compilers.f.unresolved-features=1 | |
1 | compilers.f.unresolved-plugins=1 | |
2 | compilers.incompatible-environment=1 | |
3 | compilers.p.build=1 | |
4 | compilers.p.build.bin.includes=1 | |
5 | compilers.p.build.encodings=2 | |
6 | compilers.p.build.java.compiler=2 | |
7 | compilers.p.build.java.compliance=1 | |
8 | compilers.p.build.missing.output=1 | |
9 | compilers.p.build.output.library=1 | |
10 | compilers.p.build.source.library=1 | |
11 | compilers.p.build.src.includes=1 | |
12 | compilers.p.deprecated=2 | |
13 | compilers.p.discouraged-class=1 | |
14 | compilers.p.illegal-att-value=0 | |
15 | compilers.p.internal=1 | |
16 | compilers.p.matching-pom-version=0 | |
17 | compilers.p.missing-packages=0 | |
18 | compilers.p.missing-version-export-package=2 | |
19 | compilers.p.missing-version-import-package=2 | |
20 | compilers.p.missing-version-require-bundle=2 | |
21 | compilers.p.no-required-att=0 | |
22 | compilers.p.not-externalized-att=0 | |
23 | compilers.p.unknown-attribute=0 | |
24 | compilers.p.unknown-class=1 | |
25 | compilers.p.unknown-element=2 | |
26 | compilers.p.unknown-identifier=1 | |
27 | compilers.p.unknown-resource=0 | |
28 | compilers.p.unresolved-ex-points=0 | |
29 | compilers.p.unresolved-import=0 | |
30 | compilers.p.unused-element-or-attribute=1 | |
31 | compilers.s.create-docs=false | |
32 | compilers.s.doc-folder=doc | |
33 | compilers.s.open-tags=1 | |
34 | compilers.use-project=true | |
35 | eclipse.preferences.version=1 |
0 | Manifest-Version: 1.0 | |
1 | Bundle-ManifestVersion: 2 | |
2 | Bundle-Name: %pluginName | |
3 | Bundle-SymbolicName: org.eclipse.debug.ui.launchview;singleton:=true | |
4 | Bundle-Version: 1.0.2.qualifier | |
5 | Bundle-Vendor: %providerName | |
6 | Bundle-Localization: plugin | |
7 | Require-Bundle: org.eclipse.ui, | |
8 | org.eclipse.core.runtime, | |
9 | org.eclipse.e4.ui.model.workbench, | |
10 | org.eclipse.debug.core, | |
11 | org.eclipse.debug.ui, | |
12 | org.eclipse.osgi.services, | |
13 | org.eclipse.e4.core.di.annotations, | |
14 | org.eclipse.e4.ui.di, | |
15 | org.eclipse.e4.ui.services | |
16 | Bundle-RequiredExecutionEnvironment: JavaSE-11 | |
17 | Import-Package: javax.annotation;version="1.0.0";resolution:=optional, | |
18 | javax.inject;version="1.0.0" | |
19 | Bundle-ActivationPolicy: lazy | |
20 | Service-Component: OSGI-INF/org.eclipse.debug.ui.launchview.internal.model.LaunchViewModel.xml, | |
21 | OSGI-INF/org.eclipse.debug.ui.launchview.internal.impl.DebugCoreProvider.xml | |
22 | Export-Package: org.eclipse.debug.ui.launchview;x-internal:=true, | |
23 | org.eclipse.debug.ui.launchview.services;x-internal:=true | |
24 | Automatic-Module-Name: org.eclipse.debug.ui.launchview |
+7
-0
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" activate="createService" deactivate="destroyService" name="org.eclipse.debug.ui.launchview.internal.impl.DebugCoreProvider"> | |
2 | <service> | |
3 | <provide interface="org.eclipse.debug.ui.launchview.services.ILaunchObjectProvider"/> | |
4 | </service> | |
5 | <implementation class="org.eclipse.debug.ui.launchview.internal.impl.DebugCoreProvider"/> | |
6 | </scr:component>⏎ |
+9
-0
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.2.0" activate="activate" deactivate="deactivate" immediate="true" name="org.eclipse.debug.ui.launchview.internal.model.LaunchViewModel"> | |
2 | <service> | |
3 | <provide interface="org.eclipse.debug.ui.launchview.internal.model.ILaunchModel"/> | |
4 | </service> | |
5 | <reference bind="addLaunchObjectProvider" cardinality="0..n" interface="org.eclipse.debug.ui.launchview.services.ILaunchObjectProvider" name="LaunchObjectProvider" policy="dynamic" policy-option="greedy" unbind="removeLaunchObjectProvider"/> | |
6 | <reference bind="setWorkbench" cardinality="1..1" interface="org.eclipse.ui.IWorkbench" name="Workbench" policy="static" unbind="unsetWorkbench"/> | |
7 | <implementation class="org.eclipse.debug.ui.launchview.internal.model.LaunchViewModel"/> | |
8 | </scr:component>⏎ |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
1 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | |
5 | <title>About</title> | |
6 | </head> | |
7 | <body lang="EN-US"> | |
8 | <h2>About This Content</h2> | |
9 | ||
10 | <p>November 30, 2017</p> | |
11 | <h3>License</h3> | |
12 | ||
13 | <p> | |
14 | The Eclipse Foundation makes available all content in this plug-in | |
15 | ("Content"). Unless otherwise indicated below, the Content | |
16 | is provided to you under the terms and conditions of the Eclipse | |
17 | Public License Version 2.0 ("EPL"). A copy of the EPL is | |
18 | available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. | |
19 | For purposes of the EPL, "Program" will mean the Content. | |
20 | </p> | |
21 | ||
22 | <p> | |
23 | If you did not receive this Content directly from the Eclipse | |
24 | Foundation, the Content is being redistributed by another party | |
25 | ("Redistributor") and different terms and conditions may | |
26 | apply to your use of any object code in the Content. Check the | |
27 | Redistributor's license that was provided with the Content. If no such | |
28 | license exists, contact the Redistributor. Unless otherwise indicated | |
29 | below, the terms and conditions of the EPL still apply to any source | |
30 | code in the Content and such source code may be obtained at <a | |
31 | href="http://www.eclipse.org/">http://www.eclipse.org</a>. | |
32 | </p> | |
33 | ||
34 | </body> | |
35 | </html>⏎ |
0 | output.. = bin/ | |
1 | bin.includes = META-INF/,\ | |
2 | .,\ | |
3 | plugin.xml,\ | |
4 | OSGI-INF/,\ | |
5 | icons/,\ | |
6 | plugin.properties,\ | |
7 | about.html | |
8 | source.. = src/ | |
9 | src.includes = about.html |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | ############################################################################### | |
1 | # Copyright (c) 2000, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | # | |
3 | # This program and the accompanying materials | |
4 | # are made available under the terms of the Eclipse Public License 2.0 | |
5 | # which accompanies this distribution, and is available at | |
6 | # https://www.eclipse.org/legal/epl-2.0/ | |
7 | # | |
8 | # SPDX-License-Identifier: EPL-2.0 | |
9 | # | |
10 | # Contributors: | |
11 | # SSI Schaefer IT Solutions GmbH - initial API and implementation | |
12 | ############################################################################### | |
13 | ||
14 | ||
15 | pluginName=Debug UI Launch Configuration View | |
16 | providerName=Eclipse.org | |
17 | ||
18 | LaunchView.name=Launch Configurations |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <plugin> | |
2 | <extension | |
3 | point="org.eclipse.ui.views"> | |
4 | <e4view | |
5 | category="org.eclipse.debug.ui" | |
6 | class="org.eclipse.debug.ui.launchview.internal.view.LaunchViewImpl" | |
7 | icon="$nl$/icons/run_exc.png" | |
8 | id="org.eclipse.debug.ui.launchView" | |
9 | name="%LaunchView.name" | |
10 | restorable="true"> | |
11 | </e4view> | |
12 | </extension> | |
13 | </plugin> |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- | |
2 | Copyright (c) 2012, 2017 SSI Schaefer IT Solutions GmbH and others. | |
3 | All rights reserved. This program and the accompanying materials | |
4 | are made available under the terms of the Eclipse Distribution License v1.0 | |
5 | which accompanies this distribution, and is available at | |
6 | http://www.eclipse.org/org/documents/edl-v10.php | |
7 | ||
8 | Contributors: | |
9 | Markus Duft - initial implementation | |
10 | --> | |
11 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
12 | <modelVersion>4.0.0</modelVersion> | |
13 | <parent> | |
14 | <artifactId>eclipse.platform.debug</artifactId> | |
15 | <groupId>eclipse.platform.debug</groupId> | |
16 | <version>4.22.0-SNAPSHOT</version> | |
17 | </parent> | |
18 | ||
19 | <properties> | |
20 | <skipAPIAnalysis>true</skipAPIAnalysis> | |
21 | <code.ignoredWarnings>-warn:+resource,-deprecation,unavoidableGenericProblems</code.ignoredWarnings> | |
22 | </properties> | |
23 | ||
24 | <groupId>org.eclipse.debug</groupId> | |
25 | <artifactId>org.eclipse.debug.ui.launchview</artifactId> | |
26 | <version>1.0.2-SNAPSHOT</version> | |
27 | <packaging>eclipse-plugin</packaging> | |
28 | </project> |
+46
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2021 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview; | |
14 | ||
15 | import java.io.File; | |
16 | ||
17 | import org.eclipse.debug.core.ILaunchConfiguration; | |
18 | ||
19 | /** | |
20 | * Allows to execute a specified launch configuration in the background, i.e. | |
21 | * non-blocking. | |
22 | * <p> | |
23 | * The launch configuration is started as a background job. | |
24 | * | |
25 | * @since 1.0.2 | |
26 | */ | |
27 | public interface IBackgroundLaunchExecutor { | |
28 | ||
29 | /** | |
30 | * Starts a launch configuration. The return value is only valid if wait is | |
31 | * <code>true</code>. Otherwise the launch is not awaited and the method | |
32 | * returns immediately. | |
33 | * | |
34 | * @param launchConf the launch configuration | |
35 | * @param mode the launch mode to use. | |
36 | * @param build whether to perform a build before launch | |
37 | * @param wait whether to wait for completion | |
38 | * @param logFile an optional {@link File} to write console output to. May | |
39 | * be <code>null</code>. | |
40 | * @return process exit value if wait is <code>true</code>, always 0 if wait | |
41 | * is <code>false</code>. -1 in case waiting was interrupted. | |
42 | */ | |
43 | int launchProcess(ILaunchConfiguration launchConf, String mode, boolean build, boolean wait, File logFile); | |
44 | ||
45 | }⏎ |
+34
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2021 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.launcher.StandaloneLaunchConfigExecutor; | |
16 | ||
17 | /** | |
18 | * Static Helper which provides access to internal implementations of externally | |
19 | * available API. | |
20 | * | |
21 | * @since 1.0.2 | |
22 | */ | |
23 | public class LaunchConfigurationViewPlugin { | |
24 | ||
25 | /** | |
26 | * @return an {@link IBackgroundLaunchExecutor} which can be used to launch | |
27 | * launch configurations as background jobs. | |
28 | */ | |
29 | public static IBackgroundLaunchExecutor getExecutor() { | |
30 | return new StandaloneLaunchConfigExecutor(); | |
31 | } | |
32 | ||
33 | } |
+44
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal; | |
14 | ||
15 | import java.util.ArrayList; | |
16 | import java.util.List; | |
17 | ||
18 | import org.eclipse.debug.ui.launchview.services.ILaunchObjectProvider; | |
19 | ||
20 | /** | |
21 | * Base class for {@link ILaunchObjectProvider} implementations which require | |
22 | * listeners to be notified on updates. | |
23 | */ | |
24 | public abstract class AbstractLaunchObjectProvider implements ILaunchObjectProvider { | |
25 | ||
26 | private final List<Runnable> updateListeners = new ArrayList<>(); | |
27 | ||
28 | @Override | |
29 | public void addUpdateListener(Runnable r) { | |
30 | updateListeners.add(r); | |
31 | } | |
32 | ||
33 | @Override | |
34 | public void removeUpdateListener(Runnable r) { | |
35 | updateListeners.remove(r); | |
36 | } | |
37 | ||
38 | protected void fireUpdate() { | |
39 | // prevent multiple updates in short row somehow? | |
40 | updateListeners.forEach(Runnable::run); | |
41 | } | |
42 | ||
43 | } |
+60
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal; | |
14 | ||
15 | import java.io.BufferedWriter; | |
16 | import java.io.Closeable; | |
17 | import java.io.File; | |
18 | import java.io.FileWriter; | |
19 | import java.io.IOException; | |
20 | ||
21 | import org.eclipse.core.runtime.Platform; | |
22 | import org.eclipse.debug.core.IStreamListener; | |
23 | import org.eclipse.debug.core.model.IProcess; | |
24 | import org.eclipse.debug.core.model.IStreamMonitor; | |
25 | import org.eclipse.osgi.util.NLS; | |
26 | ||
27 | /** | |
28 | * Logger that can be attached to a {@linkplain IProcess} and that writes the | |
29 | * output to a file. | |
30 | * <p> | |
31 | * Please note that it is the responsibility of the caller to close the logger | |
32 | * if it is not used any more. | |
33 | * </p> | |
34 | */ | |
35 | public class FileLogger implements IStreamListener, Closeable { | |
36 | ||
37 | private final BufferedWriter writer; | |
38 | ||
39 | /** Creates a new logger that writes to the given file */ | |
40 | public FileLogger(File file) throws IOException { | |
41 | writer = new BufferedWriter(new FileWriter(file)); | |
42 | } | |
43 | ||
44 | @Override | |
45 | public void streamAppended(String text, IStreamMonitor monitor) { | |
46 | try { | |
47 | writer.write(text); | |
48 | writer.flush(); | |
49 | } catch (Exception ex) { | |
50 | Platform.getLog(this.getClass()).warn(NLS.bind(LaunchViewMessages.FileLogger_FailedAppend, text), ex); | |
51 | } | |
52 | } | |
53 | ||
54 | @Override | |
55 | public void close() throws IOException { | |
56 | writer.close(); | |
57 | } | |
58 | ||
59 | } |
+21
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal; | |
14 | ||
15 | public interface LaunchViewBundleInfo { | |
16 | ||
17 | // The plug-in ID | |
18 | static final String PLUGIN_ID = "org.eclipse.debug.ui.launchview"; //$NON-NLS-1$ | |
19 | ||
20 | } |
+52
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal; | |
14 | ||
15 | import org.eclipse.osgi.util.NLS; | |
16 | ||
17 | public class LaunchViewMessages extends NLS { | |
18 | private static final String BUNDLE_NAME = "org.eclipse.debug.ui.launchview.internal.messages"; //$NON-NLS-1$ | |
19 | ||
20 | public static String DebugCoreLaunchObject_CannotGetType; | |
21 | public static String DebugCoreLaunchObject_CannotRelaunch; | |
22 | public static String DebugCoreLaunchObject_CannotTerminate; | |
23 | public static String DebugCoreLaunchObject_Terminate; | |
24 | public static String DebugCoreProvider_cannotFetchError; | |
25 | public static String DebugCoreProvider_delete; | |
26 | public static String DebugCoreProvider_deleteHint; | |
27 | public static String DebugCoreProvider_FailedLookup; | |
28 | public static String EditAction_Edit; | |
29 | public static String FileLogger_FailedAppend; | |
30 | public static String LaunchAction_FailedFetchLaunchDelegates; | |
31 | public static String LaunchObject_ErrorNoId; | |
32 | public static String LaunchObjectFavoriteContainerModel_Favorites; | |
33 | public static String LaunchView_Refresh; | |
34 | public static String LaunchView_Reset; | |
35 | public static String LaunchView_TerminateAll; | |
36 | public static String RelaunchAction_TerminateRelaunch; | |
37 | public static String StandaloneLaunchConfigExecutor_FailedLaunching; | |
38 | public static String StandaloneLaunchConfigExecutor_Launch; | |
39 | public static String StandaloneLaunchConfigExecutor_Launching; | |
40 | public static String StandaloneLaunchConfigExecutor_Timeout; | |
41 | public static String StandaloneLaunchConfigExecutor_Waiting; | |
42 | public static String TerminateAction_Terminate; | |
43 | ||
44 | static { | |
45 | // initialize resource bundle | |
46 | NLS.initializeMessages(BUNDLE_NAME, LaunchViewMessages.class); | |
47 | } | |
48 | ||
49 | private LaunchViewMessages() { | |
50 | } | |
51 | } |
+98
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal; | |
14 | ||
15 | import org.eclipse.debug.core.ILaunch; | |
16 | import org.eclipse.debug.core.ILaunchConfiguration; | |
17 | import org.eclipse.debug.core.ILaunchesListener2; | |
18 | import org.eclipse.debug.core.model.IProcess; | |
19 | ||
20 | /** | |
21 | * Wrapper around {@link ILaunchesListener2} which unwraps to a single specific | |
22 | * {@link ILaunch} matching the given {@link ILaunchConfiguration} | |
23 | */ | |
24 | public abstract class SpecificLaunchListener implements ILaunchesListener2 { | |
25 | ||
26 | private interface ILaunchMethod { | |
27 | ||
28 | public void theMethod(ILaunch launch); | |
29 | } | |
30 | ||
31 | private final ILaunchConfiguration config; | |
32 | ||
33 | public SpecificLaunchListener(ILaunchConfiguration config) { | |
34 | this.config = config; | |
35 | } | |
36 | ||
37 | private boolean matches(ILaunch launch) { | |
38 | // this can happen if re-generating a running launch configuration | |
39 | if (launch == null || launch.getLaunchConfiguration() == null) { | |
40 | return false; | |
41 | } | |
42 | ||
43 | return launch.getLaunchConfiguration().contentsEqual(this.config); | |
44 | } | |
45 | ||
46 | private void runIfMatches(ILaunch[] launches, ILaunchMethod handle) { | |
47 | for (ILaunch l : launches) { | |
48 | if (matches(l)) { | |
49 | handle.theMethod(l); | |
50 | } | |
51 | } | |
52 | } | |
53 | ||
54 | @Override | |
55 | public void launchesRemoved(ILaunch[] launches) { | |
56 | runIfMatches(launches, this::launchRemoved); | |
57 | } | |
58 | ||
59 | @Override | |
60 | public void launchesAdded(ILaunch[] launches) { | |
61 | runIfMatches(launches, this::launchAdded); | |
62 | } | |
63 | ||
64 | @Override | |
65 | public void launchesChanged(ILaunch[] launches) { | |
66 | runIfMatches(launches, this::launchChanged); | |
67 | } | |
68 | ||
69 | @Override | |
70 | public void launchesTerminated(ILaunch[] launches) { | |
71 | runIfMatches(launches, this::launchTerminated); | |
72 | } | |
73 | ||
74 | public void launchRemoved(@SuppressWarnings("unused") ILaunch launch) { | |
75 | // default: nothing | |
76 | } | |
77 | ||
78 | public void launchAdded(@SuppressWarnings("unused") ILaunch launch) { | |
79 | // default: nothing | |
80 | } | |
81 | ||
82 | /** | |
83 | * Called whenever a launch changes. Adding an {@link IProcess} to the | |
84 | * {@link ILaunch} is a change. | |
85 | */ | |
86 | public void launchChanged(@SuppressWarnings("unused") ILaunch launch) { | |
87 | // default: nothing | |
88 | } | |
89 | ||
90 | /** | |
91 | * Called whenever the launch is terminated. | |
92 | */ | |
93 | public void launchTerminated(@SuppressWarnings("unused") ILaunch launch) { | |
94 | // default: nothing | |
95 | } | |
96 | ||
97 | } |
+40
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal; | |
14 | ||
15 | import java.io.Closeable; | |
16 | ||
17 | /** | |
18 | * Provides static helpers to work with streams | |
19 | */ | |
20 | public class StreamHelper { | |
21 | ||
22 | /** | |
23 | * Unconditionally close a <code>Closeable</code> without throwing any | |
24 | * exception. | |
25 | * | |
26 | * @param closeable the object to close, may be null or already closed | |
27 | */ | |
28 | public static void closeQuietly(Closeable closeable) { | |
29 | if (closeable == null) { | |
30 | return; | |
31 | } | |
32 | try { | |
33 | closeable.close(); | |
34 | } catch (Exception e) { | |
35 | // ignore | |
36 | } | |
37 | } | |
38 | ||
39 | } |
+188
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2021 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | * IBM Corporation - Bug fixes | |
13 | *******************************************************************************/ | |
14 | package org.eclipse.debug.ui.launchview.internal.impl; | |
15 | ||
16 | import java.util.ArrayList; | |
17 | import java.util.Collection; | |
18 | import java.util.Collections; | |
19 | ||
20 | import org.eclipse.core.runtime.CoreException; | |
21 | import org.eclipse.core.runtime.IProgressMonitor; | |
22 | import org.eclipse.core.runtime.IStatus; | |
23 | import org.eclipse.core.runtime.Platform; | |
24 | import org.eclipse.core.runtime.Status; | |
25 | import org.eclipse.core.runtime.jobs.Job; | |
26 | import org.eclipse.debug.core.DebugException; | |
27 | import org.eclipse.debug.core.DebugPlugin; | |
28 | import org.eclipse.debug.core.ILaunch; | |
29 | import org.eclipse.debug.core.ILaunchConfiguration; | |
30 | import org.eclipse.debug.core.ILaunchConfigurationType; | |
31 | import org.eclipse.debug.core.ILaunchMode; | |
32 | import org.eclipse.debug.ui.DebugUITools; | |
33 | import org.eclipse.debug.ui.IDebugUIConstants; | |
34 | import org.eclipse.debug.ui.ILaunchGroup; | |
35 | import org.eclipse.debug.ui.launchview.LaunchConfigurationViewPlugin; | |
36 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
37 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
38 | import org.eclipse.debug.ui.launchview.services.ILaunchObject; | |
39 | import org.eclipse.jface.viewers.StyledString; | |
40 | import org.eclipse.osgi.util.NLS; | |
41 | import org.eclipse.ui.PlatformUI; | |
42 | ||
43 | public class DebugCoreLaunchObject implements ILaunchObject, Comparable<ILaunchObject> { | |
44 | ||
45 | private final ILaunchConfiguration config; | |
46 | ||
47 | public DebugCoreLaunchObject(ILaunchConfiguration config) { | |
48 | this.config = config; | |
49 | } | |
50 | ||
51 | @Override | |
52 | public String getId() { | |
53 | return config.getName(); | |
54 | } | |
55 | ||
56 | @Override | |
57 | public StyledString getLabel() { | |
58 | return new StyledString(config.getName()); | |
59 | } | |
60 | ||
61 | @Override | |
62 | public ILaunchConfigurationType getType() { | |
63 | try { | |
64 | return config.getType(); | |
65 | } catch (CoreException e) { | |
66 | Platform.getLog(this.getClass()).error(NLS.bind(LaunchViewMessages.DebugCoreLaunchObject_CannotGetType, config.getName()), e); | |
67 | } | |
68 | return null; | |
69 | } | |
70 | ||
71 | @Override | |
72 | public void launch(ILaunchMode mode) { | |
73 | LaunchConfigurationViewPlugin.getExecutor().launchProcess(config, mode.getIdentifier(), true, false, null); | |
74 | } | |
75 | ||
76 | @Override | |
77 | public boolean canTerminate() { | |
78 | return !findTerminateableLaunches(config.getName()).isEmpty(); | |
79 | } | |
80 | ||
81 | @Override | |
82 | public void terminate() { | |
83 | // DON'T use Eclipse' mechanism - it's a little broken if shutdown of | |
84 | // the processes takes longer than a few seconds. | |
85 | // Instead we start a job that tries to terminate processes. If the job | |
86 | // itself is stopped, we give up like Eclipse does. | |
87 | Collection<ILaunch> launches = findTerminateableLaunches(config.getName()); | |
88 | for (ILaunch launch: launches) { | |
89 | Job terminateJob = new Job(NLS.bind(LaunchViewMessages.DebugCoreLaunchObject_Terminate, config.getName())) { | |
90 | ||
91 | @Override | |
92 | protected IStatus run(IProgressMonitor monitor) { | |
93 | if (!launch.isTerminated()) { | |
94 | try { | |
95 | launch.terminate(); | |
96 | } catch (DebugException e) { | |
97 | // could not terminate - but we cannot do anything | |
98 | // anyway... :( | |
99 | return new Status(IStatus.WARNING, LaunchViewBundleInfo.PLUGIN_ID, NLS.bind(LaunchViewMessages.DebugCoreLaunchObject_CannotTerminate, config.getName())); | |
100 | } | |
101 | } | |
102 | return Status.OK_STATUS; | |
103 | } | |
104 | }; | |
105 | ||
106 | terminateJob.setUser(true); | |
107 | terminateJob.schedule(); | |
108 | } | |
109 | } | |
110 | ||
111 | @Override | |
112 | public void relaunch() { | |
113 | ILaunch launch = findLaunch(getId()); | |
114 | String launchMode = launch.getLaunchMode(); | |
115 | try { | |
116 | launch.terminate(); | |
117 | LaunchConfigurationViewPlugin.getExecutor().launchProcess(config, launchMode, true, false, null); | |
118 | } catch (Exception e) { | |
119 | throw new RuntimeException(NLS.bind(LaunchViewMessages.DebugCoreLaunchObject_CannotRelaunch, config.getName()), e); | |
120 | } | |
121 | } | |
122 | ||
123 | private static ILaunch findLaunch(String name) { | |
124 | for (ILaunch l : DebugPlugin.getDefault().getLaunchManager().getLaunches()) { | |
125 | if (l.getLaunchConfiguration() == null || l.isTerminated()) { | |
126 | continue; | |
127 | } | |
128 | if (l.getLaunchConfiguration().getName().equals(name)) { | |
129 | return l; | |
130 | } | |
131 | } | |
132 | return null; | |
133 | } | |
134 | ||
135 | private static Collection<ILaunch> findTerminateableLaunches(String name) { | |
136 | Collection<ILaunch> result = new ArrayList<>(); | |
137 | for (ILaunch l : DebugPlugin.getDefault().getLaunchManager().getLaunches()) { | |
138 | if (l.getLaunchConfiguration() == null || l.isTerminated()) { | |
139 | continue; | |
140 | } | |
141 | if (l.getLaunchConfiguration().getName().equals(name) && l.canTerminate()) { | |
142 | result.add(l); | |
143 | } | |
144 | } | |
145 | return result; | |
146 | } | |
147 | ||
148 | @Override | |
149 | public void edit() { | |
150 | // This prefers "debug" mode as the Eclipse infrastructure | |
151 | // requires a group to be given. This covers most launch configurations | |
152 | // as most of them support debug, whereas e.g. "Remote Java Application" | |
153 | // does not support "run". Ant launch configurations in turn do not | |
154 | // support debug... | |
155 | ILaunchGroup group = DebugUITools.getLaunchGroup(config, "debug"); //$NON-NLS-1$ | |
156 | if (group == null) { | |
157 | group = DebugUITools.getLaunchGroup(config, "run"); //$NON-NLS-1$ | |
158 | } | |
159 | if (group != null) { // Id Debug & run both not supported and only | |
160 | // profile is supported | |
161 | DebugUITools.openLaunchConfigurationDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), config, group.getIdentifier(), null); | |
162 | } | |
163 | } | |
164 | ||
165 | @Override | |
166 | public boolean isFavorite() { | |
167 | try { | |
168 | return !config.getAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, Collections.emptyList()).isEmpty(); | |
169 | } catch (CoreException e) { | |
170 | return false; // oups | |
171 | } | |
172 | } | |
173 | ||
174 | @Override | |
175 | public int compareTo(ILaunchObject o) { | |
176 | if (getId() == null) { | |
177 | Platform.getLog(this.getClass()).warn(NLS.bind(LaunchViewMessages.LaunchObject_ErrorNoId, this), null); | |
178 | if (o.getId() == null) { | |
179 | return 0; | |
180 | } | |
181 | return 1; | |
182 | } | |
183 | ||
184 | return getId().compareTo(o.getId()); | |
185 | } | |
186 | ||
187 | } |
+155
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.impl; | |
14 | ||
15 | import java.util.Arrays; | |
16 | import java.util.Collections; | |
17 | import java.util.Set; | |
18 | import java.util.TreeSet; | |
19 | import java.util.function.Supplier; | |
20 | import java.util.stream.Collectors; | |
21 | ||
22 | import org.eclipse.core.runtime.CoreException; | |
23 | import org.eclipse.debug.core.DebugPlugin; | |
24 | import org.eclipse.debug.core.ILaunch; | |
25 | import org.eclipse.debug.core.ILaunchConfiguration; | |
26 | import org.eclipse.debug.core.ILaunchConfigurationListener; | |
27 | import org.eclipse.debug.core.ILaunchConfigurationType; | |
28 | import org.eclipse.debug.core.ILaunchManager; | |
29 | import org.eclipse.debug.core.ILaunchesListener2; | |
30 | import org.eclipse.debug.ui.launchview.internal.AbstractLaunchObjectProvider; | |
31 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
32 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
33 | import org.eclipse.debug.ui.launchview.services.ILaunchObject; | |
34 | import org.eclipse.debug.ui.launchview.services.ILaunchObjectProvider; | |
35 | import org.eclipse.e4.core.di.annotations.CanExecute; | |
36 | import org.eclipse.e4.core.di.annotations.Execute; | |
37 | import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; | |
38 | import org.eclipse.e4.ui.model.application.ui.menu.MMenu; | |
39 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; | |
40 | import org.osgi.service.component.annotations.Activate; | |
41 | import org.osgi.service.component.annotations.Component; | |
42 | import org.osgi.service.component.annotations.Deactivate; | |
43 | ||
44 | @Component(service = ILaunchObjectProvider.class) | |
45 | public class DebugCoreProvider extends AbstractLaunchObjectProvider implements ILaunchObjectProvider, ILaunchConfigurationListener, ILaunchesListener2 { | |
46 | ||
47 | private final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); | |
48 | ||
49 | @Activate | |
50 | public void createService() { | |
51 | DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this); | |
52 | DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); | |
53 | } | |
54 | ||
55 | @Deactivate | |
56 | public void destroyService() { | |
57 | DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this); | |
58 | DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); | |
59 | } | |
60 | ||
61 | @Override | |
62 | public Set<ILaunchObject> getLaunchObjects() { | |
63 | try { | |
64 | return Arrays.stream(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations()).map(DebugCoreLaunchObject::new).collect(Collectors.toCollection(TreeSet::new)); | |
65 | } catch (CoreException e) { | |
66 | org.eclipse.core.runtime.Platform.getLog(this.getClass()).error(LaunchViewMessages.DebugCoreProvider_FailedLookup, e); | |
67 | return Collections.emptySet(); | |
68 | } | |
69 | } | |
70 | ||
71 | @Override | |
72 | public void launchConfigurationAdded(ILaunchConfiguration configuration) { | |
73 | fireUpdate(); | |
74 | } | |
75 | ||
76 | @Override | |
77 | public void launchConfigurationChanged(ILaunchConfiguration configuration) { | |
78 | fireUpdate(); | |
79 | } | |
80 | ||
81 | @Override | |
82 | public void launchConfigurationRemoved(ILaunchConfiguration configuration) { | |
83 | fireUpdate(); | |
84 | } | |
85 | ||
86 | @Override | |
87 | public int getPriority() { | |
88 | return 0; | |
89 | } | |
90 | ||
91 | @Override | |
92 | public void launchesRemoved(ILaunch[] launches) { | |
93 | } | |
94 | ||
95 | @Override | |
96 | public void launchesAdded(ILaunch[] launches) { | |
97 | } | |
98 | ||
99 | @Override | |
100 | public void launchesChanged(ILaunch[] launches) { | |
101 | fireUpdate(); // process added, thus can terminate | |
102 | } | |
103 | ||
104 | @Override | |
105 | public void launchesTerminated(ILaunch[] launches) { | |
106 | fireUpdate(); | |
107 | } | |
108 | ||
109 | @Override | |
110 | public void contributeViewMenu(Supplier<Set<ILaunchObject>> selected, MMenu menu) { | |
111 | // nothing to contribute for now... | |
112 | } | |
113 | ||
114 | @Override | |
115 | public void contributeContextMenu(Supplier<Set<ILaunchObject>> selected, MMenu menu) { | |
116 | MDirectMenuItem cleanup = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
117 | cleanup.setLabel(LaunchViewMessages.DebugCoreProvider_delete); | |
118 | cleanup.setTooltip(LaunchViewMessages.DebugCoreProvider_deleteHint); | |
119 | cleanup.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/icons/remove_exc.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
120 | cleanup.setObject(new Object() { | |
121 | ||
122 | @Execute | |
123 | public void cleanup() throws CoreException { | |
124 | for (ILaunchObject e : selected.get()) { | |
125 | findLaunchConfiguration(e.getType(), e.getId()).delete(); | |
126 | } | |
127 | ||
128 | fireUpdate(); | |
129 | } | |
130 | ||
131 | @CanExecute | |
132 | public boolean isEnabled() { | |
133 | return selected.get().stream().allMatch(e -> e instanceof DebugCoreLaunchObject && findLaunchConfiguration(e.getType(), e.getId()) != null); | |
134 | } | |
135 | }); | |
136 | ||
137 | menu.getChildren().add(MMenuFactory.INSTANCE.createMenuSeparator()); | |
138 | menu.getChildren().add(cleanup); | |
139 | } | |
140 | ||
141 | ILaunchConfiguration findLaunchConfiguration(ILaunchConfigurationType type, String name) { | |
142 | try { | |
143 | for (ILaunchConfiguration config : manager.getLaunchConfigurations(type)) { | |
144 | if (config.getName().equals(name)) { | |
145 | return config; | |
146 | } | |
147 | } | |
148 | return null; | |
149 | } catch (Exception e) { | |
150 | throw new RuntimeException(LaunchViewMessages.DebugCoreProvider_cannotFetchError, e); | |
151 | } | |
152 | } | |
153 | ||
154 | } |
+220
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.launcher; | |
14 | ||
15 | import java.io.File; | |
16 | import java.util.HashSet; | |
17 | import java.util.Set; | |
18 | ||
19 | import org.eclipse.core.runtime.IProgressMonitor; | |
20 | import org.eclipse.core.runtime.IStatus; | |
21 | import org.eclipse.core.runtime.Platform; | |
22 | import org.eclipse.core.runtime.Status; | |
23 | import org.eclipse.core.runtime.jobs.Job; | |
24 | import org.eclipse.debug.core.DebugPlugin; | |
25 | import org.eclipse.debug.core.ILaunch; | |
26 | import org.eclipse.debug.core.ILaunchConfiguration; | |
27 | import org.eclipse.debug.core.ILaunchManager; | |
28 | import org.eclipse.debug.core.model.IProcess; | |
29 | import org.eclipse.debug.ui.launchview.IBackgroundLaunchExecutor; | |
30 | import org.eclipse.debug.ui.launchview.internal.FileLogger; | |
31 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
32 | import org.eclipse.debug.ui.launchview.internal.SpecificLaunchListener; | |
33 | import org.eclipse.debug.ui.launchview.internal.StreamHelper; | |
34 | import org.eclipse.osgi.util.NLS; | |
35 | ||
36 | /** | |
37 | * Wraps launching a certain ILaunchConfiguration into a job | |
38 | */ | |
39 | public class StandaloneLaunchConfigExecutor implements IBackgroundLaunchExecutor { | |
40 | ||
41 | /** | |
42 | * Starts a launch configuration. The return value is only valid if wait is | |
43 | * <code>true</code> | |
44 | * | |
45 | * @param launchConf the launch configuration | |
46 | * @param mode the launch mode to use. | |
47 | * @param build whether to perform a build before launch | |
48 | * @param wait whether to wait for completion | |
49 | * @param logFile an optional {@link File} to write console output to. May | |
50 | * be <code>null</code>. | |
51 | * @return process exit value if wait is <code>true</code>, always 0 if wait | |
52 | * is <code>false</code>. -1 in case waiting was interrupted. | |
53 | */ | |
54 | @Override | |
55 | public int launchProcess(ILaunchConfiguration launchConf, String mode, boolean build, boolean wait, File logFile) { | |
56 | StandaloneLauncherJob launch = new StandaloneLauncherJob(launchConf, mode, build, wait, logFile); | |
57 | ||
58 | launch.setPriority(Job.SHORT); | |
59 | launch.schedule(); | |
60 | if (wait) { | |
61 | try { | |
62 | launch.join(); | |
63 | } catch (InterruptedException e) { | |
64 | return -1; | |
65 | } | |
66 | } | |
67 | ||
68 | // when waiting this is the real result, when not it's initialized to 0 | |
69 | return launch.getProcessResult(); | |
70 | } | |
71 | ||
72 | /** | |
73 | * Launches the specified configuration and optionally waits until the end | |
74 | * of execution. | |
75 | * | |
76 | * @param launchConfig launch configuration | |
77 | * @param mode the mode in which to launch | |
78 | * @param monitor progress monitor (only for cancellation) | |
79 | * @param timeout timeout in milliseconds (optional; {@code <=0} means no | |
80 | * timeout) | |
81 | * @param logFile log file where console output is redirected (optional; | |
82 | * {@code null} means no log file) | |
83 | * @return the resulting launch | |
84 | */ | |
85 | @SuppressWarnings("resource") | |
86 | private static ILaunch launch(final ILaunchConfiguration launchConfig, final String mode, final IProgressMonitor monitor, final long timeout, final File logFile, boolean build, boolean wait) throws Exception { | |
87 | final FileLogger logger; | |
88 | if (logFile != null) { | |
89 | logger = new FileLogger(logFile); | |
90 | } else { | |
91 | logger = null; | |
92 | } | |
93 | ||
94 | Object lock = new Object(); | |
95 | ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); | |
96 | launchManager.addLaunchListener(new SpecificLaunchListener(launchConfig) { | |
97 | ||
98 | private final Set<IProcess> attached = new HashSet<>(); | |
99 | ||
100 | @Override | |
101 | public void launchChanged(ILaunch launch) { | |
102 | if (logger == null) { | |
103 | return; | |
104 | } | |
105 | ||
106 | for (IProcess p : launch.getProcesses()) { | |
107 | if (!attached.contains(p)) { | |
108 | p.getStreamsProxy().getOutputStreamMonitor().addListener(logger); | |
109 | p.getStreamsProxy().getErrorStreamMonitor().addListener(logger); | |
110 | ||
111 | attached.add(p); | |
112 | } | |
113 | } | |
114 | } | |
115 | ||
116 | @Override | |
117 | public void launchTerminated(ILaunch l) { | |
118 | // found it. make sure that the streams are closed. | |
119 | StreamHelper.closeQuietly(logger); | |
120 | launchManager.removeLaunchListener(this); | |
121 | ||
122 | synchronized (lock) { | |
123 | lock.notifyAll(); | |
124 | } | |
125 | } | |
126 | }); | |
127 | ||
128 | final ILaunch launch = launchConfig.launch(mode, monitor, build, true); | |
129 | monitor.subTask(LaunchViewMessages.StandaloneLaunchConfigExecutor_Waiting); | |
130 | ||
131 | if (wait) { | |
132 | long timeRunning = 0; | |
133 | while (launch.hasChildren() && !launch.isTerminated()) { | |
134 | if (monitor.isCanceled()) { | |
135 | launch.terminate(); | |
136 | } | |
137 | if (timeout > 0 && timeRunning > timeout) { | |
138 | launch.terminate(); | |
139 | StreamHelper.closeQuietly(logger); | |
140 | throw new InterruptedException(NLS.bind(LaunchViewMessages.StandaloneLaunchConfigExecutor_Timeout, timeout)); | |
141 | } | |
142 | synchronized (lock) { | |
143 | lock.wait(500); | |
144 | } | |
145 | timeRunning += 500; | |
146 | } | |
147 | } | |
148 | return launch; | |
149 | } | |
150 | ||
151 | /** | |
152 | * Job that launches a {@link LaunchConfig} in the background. | |
153 | */ | |
154 | private static class StandaloneLauncherJob extends Job { | |
155 | ||
156 | private final ILaunchConfiguration config; | |
157 | ||
158 | private int result = 0; | |
159 | private final String mode; | |
160 | private final boolean build; | |
161 | private final boolean wait; | |
162 | ||
163 | private final File logFile; | |
164 | ||
165 | /** | |
166 | * Creates a new {@link StandaloneLauncherJob} to monitor an await | |
167 | * launching of {@link ILaunchConfiguration}s | |
168 | * | |
169 | * @param config the {@link ILaunchConfiguration} to start | |
170 | * @param mode the mode in which to launch | |
171 | * @param build whether to build before launch | |
172 | * @param wait whether to keep the job alive until the associated | |
173 | * {@link ILaunch} terminates. | |
174 | * @param logFile an optional {@link File} to write console output to. | |
175 | * May be <code>null</code>. | |
176 | */ | |
177 | StandaloneLauncherJob(ILaunchConfiguration config, String mode, boolean build, boolean wait, File logFile) { | |
178 | super(NLS.bind(LaunchViewMessages.StandaloneLaunchConfigExecutor_Launch, config.getName())); | |
179 | this.config = config; | |
180 | this.build = build; | |
181 | this.wait = wait; | |
182 | this.logFile = logFile; | |
183 | this.mode = mode; | |
184 | } | |
185 | ||
186 | int getProcessResult() { | |
187 | return result; | |
188 | } | |
189 | ||
190 | @Override | |
191 | protected IStatus run(IProgressMonitor monitor) { | |
192 | try { | |
193 | monitor.beginTask(NLS.bind(LaunchViewMessages.StandaloneLaunchConfigExecutor_Launching, config.getName()), IProgressMonitor.UNKNOWN); | |
194 | ||
195 | ILaunch launch = launch(config, mode, monitor, 0, logFile, build, wait); | |
196 | ||
197 | if (wait) { | |
198 | IProcess[] ps = launch.getProcesses(); | |
199 | ||
200 | // in our scenarios it NEVER happens that there is more than | |
201 | // one process | |
202 | for (IProcess p : ps) { | |
203 | if (p.getExitValue() != 0) { | |
204 | result = p.getExitValue(); | |
205 | } | |
206 | } | |
207 | } | |
208 | } catch (Exception e) { | |
209 | Platform.getLog(this.getClass()).error(NLS.bind(LaunchViewMessages.StandaloneLaunchConfigExecutor_FailedLaunching, config.getName()), e); | |
210 | } finally { | |
211 | monitor.done(); | |
212 | } | |
213 | ||
214 | // always return OK, to avoid error messages | |
215 | return Status.OK_STATUS; | |
216 | } | |
217 | } | |
218 | ||
219 | } |
+37
-0
0 | ############################################################################### | |
1 | # Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | # | |
3 | # This program and the accompanying materials | |
4 | # are made available under the terms of the Eclipse Public License 2.0 | |
5 | # which accompanies this distribution, and is available at | |
6 | # https://www.eclipse.org/legal/epl-2.0/ | |
7 | # | |
8 | # SPDX-License-Identifier: EPL-2.0 | |
9 | # | |
10 | # Contributors: | |
11 | # SSI Schaefer IT Solutions GmbH | |
12 | ############################################################################### | |
13 | ||
14 | DebugCoreLaunchObject_CannotGetType=Cannot get type of {0} | |
15 | DebugCoreLaunchObject_CannotRelaunch=Cannot relaunch {0} | |
16 | DebugCoreLaunchObject_CannotTerminate=Cannot terminate {0} | |
17 | DebugCoreLaunchObject_Terminate=Terminate {0} | |
18 | DebugCoreProvider_cannotFetchError=Cannot fetch existing launch configurations | |
19 | DebugCoreProvider_delete=Remove | |
20 | DebugCoreProvider_deleteHint=Deletes the selected launch configuration | |
21 | DebugCoreProvider_FailedLookup=Cannot fetch launch configurations from Eclipse. | |
22 | EditAction_Edit=Edit... | |
23 | FileLogger_FailedAppend=Failed to append '{0}' to log file. | |
24 | LaunchAction_FailedFetchLaunchDelegates=Problem retreiving launch delegates | |
25 | LaunchObject_ErrorNoId=LaunchObject with null id: {0} | |
26 | LaunchObjectFavoriteContainerModel_Favorites=Favorites | |
27 | LaunchView_Refresh=Refresh | |
28 | LaunchView_Reset=Reset | |
29 | LaunchView_TerminateAll=Terminate All | |
30 | RelaunchAction_TerminateRelaunch=Terminate && Relaunch | |
31 | StandaloneLaunchConfigExecutor_FailedLaunching=Failed launching {0} | |
32 | StandaloneLaunchConfigExecutor_Launch=Launch {0} | |
33 | StandaloneLaunchConfigExecutor_Launching=Launching {0} | |
34 | StandaloneLaunchConfigExecutor_Timeout=execution exceeded maximum time of {0} ms | |
35 | StandaloneLaunchConfigExecutor_Waiting=waiting for processes... | |
36 | TerminateAction_Terminate=Terminate |
+27
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.model; | |
14 | ||
15 | /** | |
16 | * Service which controls the lifecycle of the model which the view is based on. | |
17 | */ | |
18 | public interface ILaunchModel { | |
19 | ||
20 | /** | |
21 | * @return the current model. Never <code>null</code>. Always created from | |
22 | * the current state. | |
23 | */ | |
24 | public LaunchObjectContainerModel getModel(); | |
25 | ||
26 | } |
+69
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.model; | |
14 | ||
15 | import java.util.Set; | |
16 | import java.util.TreeSet; | |
17 | ||
18 | import org.eclipse.debug.core.ILaunchConfigurationType; | |
19 | import org.eclipse.debug.internal.ui.DebugPluginImages; | |
20 | import org.eclipse.swt.graphics.Image; | |
21 | ||
22 | public class LaunchObjectContainerModel extends LaunchObjectModel { | |
23 | ||
24 | private final Set<LaunchObjectModel> children = new TreeSet<>((a, b) -> { | |
25 | if (a instanceof LaunchObjectFavoriteContainerModel) { | |
26 | return -1; | |
27 | } else if (b instanceof LaunchObjectFavoriteContainerModel) { | |
28 | return 1; | |
29 | } | |
30 | ||
31 | return a.getLabel().getString().compareTo(b.getLabel().getString()); | |
32 | }); | |
33 | private final ILaunchConfigurationType type; | |
34 | ||
35 | LaunchObjectContainerModel() { | |
36 | this(null, null); | |
37 | } | |
38 | ||
39 | LaunchObjectContainerModel(ILaunchConfigurationType type) { | |
40 | super(type.getName(), type.getIdentifier(), DebugPluginImages.getImage(type.getIdentifier())); | |
41 | this.type = type; | |
42 | } | |
43 | ||
44 | protected LaunchObjectContainerModel(String id, Image image) { | |
45 | super(id, null, image); | |
46 | this.type = null; | |
47 | } | |
48 | ||
49 | public void addChild(LaunchObjectModel model) { | |
50 | children.add(model); | |
51 | } | |
52 | ||
53 | public Set<LaunchObjectModel> getChildren() { | |
54 | return children; | |
55 | } | |
56 | ||
57 | public LaunchObjectContainerModel getContainerFor(LaunchObjectModel m) { | |
58 | for (LaunchObjectModel child : children) { | |
59 | if (child instanceof LaunchObjectContainerModel) { | |
60 | if (m.getObject().getType().equals(((LaunchObjectContainerModel) child).type)) { | |
61 | return (LaunchObjectContainerModel) child; | |
62 | } | |
63 | } | |
64 | } | |
65 | return null; | |
66 | } | |
67 | ||
68 | } |
+30
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.model; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
16 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
17 | import org.eclipse.swt.graphics.Image; | |
18 | import org.eclipse.ui.plugin.AbstractUIPlugin; | |
19 | ||
20 | public class LaunchObjectFavoriteContainerModel extends LaunchObjectContainerModel { | |
21 | ||
22 | private static final Image FAV_ICON = AbstractUIPlugin.imageDescriptorFromPlugin(LaunchViewBundleInfo.PLUGIN_ID, "icons/favorite_star.png") //$NON-NLS-1$ | |
23 | .createImage(); | |
24 | ||
25 | public LaunchObjectFavoriteContainerModel() { | |
26 | super(LaunchViewMessages.LaunchObjectFavoriteContainerModel_Favorites, FAV_ICON); | |
27 | } | |
28 | ||
29 | } |
+101
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.model; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.services.ILaunchObject; | |
16 | import org.eclipse.jface.viewers.StyledString; | |
17 | import org.eclipse.swt.graphics.Image; | |
18 | ||
19 | public class LaunchObjectModel implements Comparable<LaunchObjectModel> { | |
20 | ||
21 | private final String id; | |
22 | private final Image image; | |
23 | ||
24 | private final ILaunchObject object; | |
25 | private final String internalId; | |
26 | ||
27 | LaunchObjectModel(ILaunchObject obj) { | |
28 | this.id = obj.getId(); | |
29 | this.internalId = obj.getId(); | |
30 | this.image = obj.getImage(); | |
31 | this.object = obj; | |
32 | } | |
33 | ||
34 | LaunchObjectModel(String id, String internalId, Image image) { | |
35 | this.id = id; | |
36 | this.internalId = internalId; | |
37 | this.image = image; | |
38 | this.object = null; | |
39 | } | |
40 | ||
41 | public StyledString getLabel() { | |
42 | if (object == null) { | |
43 | return new StyledString(id); | |
44 | } | |
45 | return object.getLabel(); | |
46 | } | |
47 | ||
48 | public Image getImage() { | |
49 | return image; | |
50 | } | |
51 | ||
52 | public ILaunchObject getObject() { | |
53 | return object; | |
54 | } | |
55 | ||
56 | @Override | |
57 | public String toString() { | |
58 | return uniqueId() + "(" + getObject() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ | |
59 | } | |
60 | ||
61 | @Override | |
62 | public int compareTo(LaunchObjectModel o) { | |
63 | return uniqueId().compareTo(o.uniqueId()); | |
64 | } | |
65 | ||
66 | public String uniqueId() { | |
67 | if (id == null && internalId == null) { | |
68 | return "root"; //$NON-NLS-1$ | |
69 | } else if (internalId != null) { | |
70 | return internalId; | |
71 | } else if (object == null || object.getType() == null) { | |
72 | return id; | |
73 | } | |
74 | return object.getType().getIdentifier() + "." + id; //$NON-NLS-1$ | |
75 | } | |
76 | ||
77 | @Override | |
78 | public int hashCode() { | |
79 | final int prime = 31; | |
80 | int result = 1; | |
81 | result = prime * result + (uniqueId().hashCode()); | |
82 | return result; | |
83 | } | |
84 | ||
85 | @Override | |
86 | public boolean equals(Object obj) { | |
87 | if (this == obj) { | |
88 | return true; | |
89 | } | |
90 | if (obj == null) { | |
91 | return false; | |
92 | } | |
93 | if (getClass() != obj.getClass()) { | |
94 | return false; | |
95 | } | |
96 | LaunchObjectModel other = (LaunchObjectModel) obj; | |
97 | return uniqueId().equals(other.uniqueId()); | |
98 | } | |
99 | ||
100 | } |
+134
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.model; | |
14 | ||
15 | import java.util.ArrayList; | |
16 | import java.util.List; | |
17 | import java.util.Set; | |
18 | import java.util.TreeSet; | |
19 | import java.util.stream.Collectors; | |
20 | ||
21 | import org.eclipse.debug.ui.launchview.services.ILaunchObjectProvider; | |
22 | import org.eclipse.ui.IWorkbench; | |
23 | import org.osgi.service.component.annotations.Activate; | |
24 | import org.osgi.service.component.annotations.Component; | |
25 | import org.osgi.service.component.annotations.Deactivate; | |
26 | import org.osgi.service.component.annotations.Reference; | |
27 | import org.osgi.service.component.annotations.ReferenceCardinality; | |
28 | import org.osgi.service.component.annotations.ReferencePolicy; | |
29 | import org.osgi.service.component.annotations.ReferencePolicyOption; | |
30 | ||
31 | @Component(immediate = true) | |
32 | public class LaunchViewModel implements ILaunchModel { | |
33 | ||
34 | public Set<ILaunchObjectProvider> providers = new TreeSet<>((a, b) -> { | |
35 | int x = Integer.compare(b.getPriority(), a.getPriority()); | |
36 | if (x == 0) { | |
37 | x = a.getClass().getName().compareTo(b.getClass().getName()); | |
38 | } | |
39 | return x; | |
40 | }); | |
41 | private static LaunchViewModel service; | |
42 | ||
43 | private final List<Runnable> updateListeners = new ArrayList<>(); | |
44 | private final Runnable providerUpdateListener = () -> fireUpdate(); | |
45 | ||
46 | public Set<ILaunchObjectProvider> getProviders() { | |
47 | return providers; | |
48 | } | |
49 | ||
50 | @Override | |
51 | public LaunchObjectContainerModel getModel() { | |
52 | LaunchObjectContainerModel root = new LaunchObjectContainerModel(); | |
53 | ||
54 | // find all objects from services, sorted by prio (highest prio first). | |
55 | Set<LaunchObjectModel> allObjects = providers.stream().map(p -> p.getLaunchObjects()).flatMap(o -> o.stream().map(LaunchObjectModel::new)).collect(Collectors.toCollection(TreeSet::new)); | |
56 | ||
57 | // create favorite container | |
58 | LaunchObjectFavoriteContainerModel favorites = new LaunchObjectFavoriteContainerModel(); | |
59 | root.addChild(favorites); | |
60 | ||
61 | // create all required type containers | |
62 | allObjects.stream().map(o -> o.getObject().getType()).distinct().map(LaunchObjectContainerModel::new).forEach(root::addChild); | |
63 | ||
64 | // create all nodes | |
65 | allObjects.stream().forEach(m -> { | |
66 | LaunchObjectContainerModel container = root.getContainerFor(m); | |
67 | if (container == null) { | |
68 | return; | |
69 | } | |
70 | container.addChild(m); | |
71 | if (m.getObject() != null && m.getObject().isFavorite()) { | |
72 | favorites.addChild(m); | |
73 | } | |
74 | }); | |
75 | ||
76 | // this is the root :) | |
77 | return root; | |
78 | } | |
79 | ||
80 | @Reference(service = ILaunchObjectProvider.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY) | |
81 | public void addLaunchObjectProvider(ILaunchObjectProvider svc) { | |
82 | providers.add(svc); | |
83 | svc.addUpdateListener(providerUpdateListener); | |
84 | ||
85 | fireUpdate(); | |
86 | } | |
87 | ||
88 | public void removeLaunchObjectProvider(ILaunchObjectProvider svc) { | |
89 | providers.remove(svc); | |
90 | svc.removeUpdateListener(providerUpdateListener); | |
91 | ||
92 | fireUpdate(); | |
93 | } | |
94 | ||
95 | @Reference(service = IWorkbench.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.STATIC, unbind = "unsetWorkbench") | |
96 | public void setWorkbench(@SuppressWarnings("unused") IWorkbench svc) { | |
97 | // this reference is just a marker to control startup order. | |
98 | // this is required, otherwise this service activates so early, that the | |
99 | // prompt for the workspace location is no longer shown (as the location | |
100 | // is accessed indirectly before the prompt, which initializes it to a | |
101 | // default). | |
102 | } | |
103 | ||
104 | public void unsetWorkbench(@SuppressWarnings("unused") IWorkbench svc) { | |
105 | } | |
106 | ||
107 | @Activate | |
108 | public void activate() { | |
109 | service = this; | |
110 | } | |
111 | ||
112 | @Deactivate | |
113 | public void deactivate() { | |
114 | service = null; | |
115 | } | |
116 | ||
117 | public void addUpdateListener(Runnable r) { | |
118 | updateListeners.add(r); | |
119 | } | |
120 | ||
121 | public void removeUpdateListener(Runnable r) { | |
122 | updateListeners.remove(r); | |
123 | } | |
124 | ||
125 | private void fireUpdate() { | |
126 | updateListeners.forEach(Runnable::run); | |
127 | } | |
128 | ||
129 | public static LaunchViewModel getService() { | |
130 | return service; | |
131 | } | |
132 | ||
133 | } |
+50
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
16 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
17 | import org.eclipse.e4.core.di.annotations.CanExecute; | |
18 | import org.eclipse.e4.core.di.annotations.Execute; | |
19 | import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; | |
20 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; | |
21 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem; | |
22 | ||
23 | public class EditAction { | |
24 | ||
25 | private LaunchViewImpl view; | |
26 | ||
27 | public EditAction(LaunchViewImpl view) { | |
28 | this.view = view; | |
29 | } | |
30 | ||
31 | public MMenuItem asMMenuItem() { | |
32 | MDirectMenuItem item = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
33 | item.setLabel(LaunchViewMessages.EditAction_Edit); | |
34 | item.setObject(this); | |
35 | item.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/icons/edit_template.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
36 | return item; | |
37 | } | |
38 | ||
39 | @CanExecute | |
40 | public boolean isEnabled() { | |
41 | return view.get().size() == 1; | |
42 | } | |
43 | ||
44 | @Execute | |
45 | public void run() { | |
46 | view.get().iterator().next().edit(); | |
47 | } | |
48 | ||
49 | } |
+95
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import java.util.Collections; | |
16 | import java.util.Map; | |
17 | import java.util.Set; | |
18 | import java.util.TreeMap; | |
19 | ||
20 | import org.eclipse.core.runtime.CoreException; | |
21 | import org.eclipse.core.runtime.Platform; | |
22 | import org.eclipse.debug.core.ILaunchMode; | |
23 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
24 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
25 | import org.eclipse.debug.ui.launchview.services.ILaunchObject; | |
26 | import org.eclipse.e4.core.di.annotations.CanExecute; | |
27 | import org.eclipse.e4.core.di.annotations.Execute; | |
28 | import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; | |
29 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; | |
30 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem; | |
31 | ||
32 | public class LaunchAction { | |
33 | ||
34 | private static final Map<String, String> COMMON_MODE_ICONS; | |
35 | ||
36 | static { | |
37 | COMMON_MODE_ICONS = new TreeMap<>(); | |
38 | COMMON_MODE_ICONS.put("run", "icons/run_exc.png"); //$NON-NLS-1$//$NON-NLS-2$ | |
39 | COMMON_MODE_ICONS.put("debug", "icons/debug_exc.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
40 | COMMON_MODE_ICONS.put("profile", "icons/profile_exc.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
41 | COMMON_MODE_ICONS.put("coverage", "icons/coverage.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
42 | } | |
43 | ||
44 | private final ILaunchMode mode; | |
45 | private LaunchViewImpl view; | |
46 | ||
47 | public LaunchAction(ILaunchMode mode, LaunchViewImpl view) { | |
48 | this.mode = mode; | |
49 | this.view = view; | |
50 | } | |
51 | ||
52 | public MMenuItem asMMenuItem() { | |
53 | MDirectMenuItem item = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
54 | item.setLabel(mode.getLabel()); | |
55 | item.setObject(this); | |
56 | ||
57 | if (COMMON_MODE_ICONS.containsKey(mode.getIdentifier())) { | |
58 | item.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/" + COMMON_MODE_ICONS.get(mode.getIdentifier())); //$NON-NLS-1$ //$NON-NLS-2$ | |
59 | } | |
60 | ||
61 | return item; | |
62 | } | |
63 | ||
64 | @CanExecute | |
65 | public boolean isEnabled() { | |
66 | return view.get().stream().allMatch((m) -> { | |
67 | try { | |
68 | return m.getType().getDelegates(Collections.singleton(mode.getIdentifier())).length > 0; | |
69 | } catch (CoreException e) { | |
70 | Platform.getLog(this.getClass()).warn(LaunchViewMessages.LaunchAction_FailedFetchLaunchDelegates, e); | |
71 | return false; | |
72 | } | |
73 | }); | |
74 | } | |
75 | ||
76 | @Execute | |
77 | public void run() { | |
78 | Set<ILaunchObject> objects = view.get(); | |
79 | for (ILaunchObject m : objects) { | |
80 | m.launch(mode); | |
81 | ||
82 | if (objects.size() > 1) { | |
83 | // PDE has a nasty bug. If launching too fast, it tries to | |
84 | // overwrite the last configurations platform.xml | |
85 | try { | |
86 | Thread.sleep(2_000); | |
87 | } catch (InterruptedException ie) { | |
88 | // ignored | |
89 | } | |
90 | } | |
91 | } | |
92 | } | |
93 | ||
94 | } |
+45
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.model.LaunchObjectContainerModel; | |
16 | import org.eclipse.jface.viewers.ITreeContentProvider; | |
17 | ||
18 | public class LaunchViewContentProvider implements ITreeContentProvider { | |
19 | ||
20 | @Override | |
21 | public Object[] getElements(Object inputElement) { | |
22 | return getChildren(inputElement); | |
23 | } | |
24 | ||
25 | @Override | |
26 | public Object[] getChildren(Object parentElement) { | |
27 | if (parentElement instanceof LaunchObjectContainerModel) { | |
28 | return ((LaunchObjectContainerModel) parentElement).getChildren().toArray(); | |
29 | } | |
30 | ||
31 | return null; | |
32 | } | |
33 | ||
34 | @Override | |
35 | public Object getParent(Object element) { | |
36 | return null; | |
37 | } | |
38 | ||
39 | @Override | |
40 | public boolean hasChildren(Object element) { | |
41 | return (element instanceof LaunchObjectContainerModel && !((LaunchObjectContainerModel) element).getChildren().isEmpty()); | |
42 | } | |
43 | ||
44 | } |
+321
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import java.util.ArrayList; | |
16 | import java.util.Collections; | |
17 | import java.util.List; | |
18 | import java.util.Objects; | |
19 | import java.util.Set; | |
20 | import java.util.TreeSet; | |
21 | import java.util.function.Supplier; | |
22 | import java.util.stream.Collectors; | |
23 | ||
24 | import javax.annotation.PostConstruct; | |
25 | import javax.annotation.PreDestroy; | |
26 | import javax.inject.Inject; | |
27 | ||
28 | import org.eclipse.core.runtime.IProgressMonitor; | |
29 | import org.eclipse.core.runtime.IStatus; | |
30 | import org.eclipse.core.runtime.Status; | |
31 | import org.eclipse.core.runtime.jobs.Job; | |
32 | import org.eclipse.debug.core.DebugPlugin; | |
33 | import org.eclipse.debug.core.ILaunchMode; | |
34 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
35 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
36 | import org.eclipse.debug.ui.launchview.internal.model.LaunchObjectContainerModel; | |
37 | import org.eclipse.debug.ui.launchview.internal.model.LaunchObjectFavoriteContainerModel; | |
38 | import org.eclipse.debug.ui.launchview.internal.model.LaunchObjectModel; | |
39 | import org.eclipse.debug.ui.launchview.internal.model.LaunchViewModel; | |
40 | import org.eclipse.debug.ui.launchview.services.ILaunchObject; | |
41 | import org.eclipse.e4.core.di.annotations.Execute; | |
42 | import org.eclipse.e4.ui.di.Focus; | |
43 | import org.eclipse.e4.ui.model.application.ui.basic.MPart; | |
44 | import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; | |
45 | import org.eclipse.e4.ui.model.application.ui.menu.MMenu; | |
46 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; | |
47 | import org.eclipse.e4.ui.model.application.ui.menu.MPopupMenu; | |
48 | import org.eclipse.e4.ui.services.EMenuService; | |
49 | import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider; | |
50 | import org.eclipse.jface.viewers.ISelection; | |
51 | import org.eclipse.jface.viewers.IStructuredSelection; | |
52 | import org.eclipse.jface.viewers.ITreeSelection; | |
53 | import org.eclipse.jface.viewers.TreePath; | |
54 | import org.eclipse.jface.viewers.Viewer; | |
55 | import org.eclipse.swt.SWT; | |
56 | import org.eclipse.swt.layout.GridData; | |
57 | import org.eclipse.swt.layout.GridLayout; | |
58 | import org.eclipse.swt.widgets.Composite; | |
59 | import org.eclipse.ui.dialogs.FilteredTree; | |
60 | import org.eclipse.ui.dialogs.PatternFilter; | |
61 | ||
62 | public class LaunchViewImpl implements Supplier<Set<ILaunchObject>> { | |
63 | ||
64 | private static final String CONTEXT_MENU_ID = "LaunchViewContextMenu"; //$NON-NLS-1$ | |
65 | ||
66 | private LaunchViewModel model; | |
67 | private final Runnable reset = () -> queueReset(); | |
68 | private final Job resetJob; | |
69 | private FilteredTree tree; | |
70 | ||
71 | @Inject | |
72 | EMenuService menuService; | |
73 | ||
74 | public LaunchViewImpl() { | |
75 | resetJob = new Job(LaunchViewMessages.LaunchView_Reset) { | |
76 | ||
77 | @Override | |
78 | protected IStatus run(IProgressMonitor monitor) { | |
79 | reset(); | |
80 | return Status.OK_STATUS; | |
81 | } | |
82 | }; | |
83 | ||
84 | resetJob.setSystem(true); | |
85 | } | |
86 | ||
87 | @PostConstruct | |
88 | public void createView(Composite parent, MPart part) { | |
89 | model = LaunchViewModel.getService(); | |
90 | model.addUpdateListener(reset); | |
91 | ||
92 | tree = new FilteredTree(parent, SWT.BORDER | SWT.MULTI, new PatternFilter() { | |
93 | ||
94 | @Override | |
95 | public void setPattern(String pattern) { | |
96 | if (pattern != null && !pattern.isEmpty() && pattern.indexOf("*") != 0 && pattern.indexOf("?") != 0 //$NON-NLS-1$ //$NON-NLS-2$ | |
97 | && pattern.indexOf(".") != 0) { //$NON-NLS-1$ | |
98 | super.setPattern("*" + pattern); //$NON-NLS-1$ | |
99 | } else { | |
100 | super.setPattern(pattern); | |
101 | } | |
102 | } | |
103 | ||
104 | @Override | |
105 | protected boolean isLeafMatch(Viewer viewer, Object element) { | |
106 | if (!(element instanceof LaunchObjectModel) || element instanceof LaunchObjectContainerModel) { | |
107 | return false; | |
108 | } | |
109 | String txt = ((LaunchObjectModel) element).getLabel().toString(); | |
110 | return wordMatches(txt); | |
111 | } | |
112 | }, true, true); | |
113 | tree.getViewer().setContentProvider(new LaunchViewContentProvider()); | |
114 | tree.getViewer().setLabelProvider(new DelegatingStyledCellLabelProvider(new LaunchViewLabelProvider())); | |
115 | tree.getViewer().getTree().setLayout(new GridLayout()); | |
116 | tree.getViewer().getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); | |
117 | createMenus(part); | |
118 | ||
119 | tree.getViewer().addDoubleClickListener((e) -> { | |
120 | ITreeSelection selection = tree.getViewer().getStructuredSelection(); | |
121 | if (selection.isEmpty()) { | |
122 | return; | |
123 | } | |
124 | ||
125 | for (Object selected : selection.toList()) { | |
126 | if (selected instanceof LaunchObjectContainerModel) { | |
127 | tree.getViewer().setExpandedState(selected, !tree.getViewer().getExpandedState(selected)); | |
128 | return; // only supported for single element double-click | |
129 | } | |
130 | } | |
131 | ||
132 | new LaunchAction(DebugPlugin.getDefault().getLaunchManager().getLaunchMode("run"), LaunchViewImpl.this).run(); //$NON-NLS-1$ | |
133 | }); | |
134 | ||
135 | reset(); | |
136 | } | |
137 | ||
138 | @Focus | |
139 | public void onFocus() { | |
140 | tree.getViewer().getControl().setFocus(); | |
141 | } | |
142 | ||
143 | private void createMenus(MPart part) { | |
144 | part.getMenus().clear(); // clear persisted state | |
145 | ||
146 | // View menu | |
147 | MMenu viewMenu = MMenuFactory.INSTANCE.createMenu(); | |
148 | viewMenu.setElementId("menu:" + part.getElementId()); //$NON-NLS-1$ | |
149 | viewMenu.getTags().add("ViewMenu"); //$NON-NLS-1$ | |
150 | ||
151 | MDirectMenuItem refresh = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
152 | refresh.setLabel(LaunchViewMessages.LaunchView_Refresh); | |
153 | refresh.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/icons/refresh.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
154 | refresh.setObject(new RefreshHandler()); | |
155 | ||
156 | MDirectMenuItem terminateAll = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
157 | terminateAll.setLabel(LaunchViewMessages.LaunchView_TerminateAll); | |
158 | terminateAll.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/icons/terminate_all_co.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
159 | terminateAll.setObject(new TerminateAllHandler()); | |
160 | ||
161 | viewMenu.getChildren().add(refresh); | |
162 | viewMenu.getChildren().add(MMenuFactory.INSTANCE.createMenuSeparator()); | |
163 | viewMenu.getChildren().add(terminateAll); | |
164 | ||
165 | // contributions from providers | |
166 | model.getProviders().forEach(p -> p.contributeViewMenu(this, viewMenu)); | |
167 | ||
168 | part.getMenus().add(viewMenu); | |
169 | ||
170 | // Context menu | |
171 | MPopupMenu ctxMenu = MMenuFactory.INSTANCE.createPopupMenu(); | |
172 | ctxMenu.setElementId(CONTEXT_MENU_ID); | |
173 | ||
174 | // one menu item for each mode that launches all selected | |
175 | for (ILaunchMode mode : getPreSortedLaunchModes()) { | |
176 | ctxMenu.getChildren().add(new LaunchAction(mode, this).asMMenuItem()); | |
177 | } | |
178 | ||
179 | ctxMenu.getChildren().add(MMenuFactory.INSTANCE.createMenuSeparator()); | |
180 | ctxMenu.getChildren().add(new RelaunchAction(this).asMMenuItem()); | |
181 | ctxMenu.getChildren().add(new TerminateAction(this).asMMenuItem()); | |
182 | ctxMenu.getChildren().add(MMenuFactory.INSTANCE.createMenuSeparator()); | |
183 | ctxMenu.getChildren().add(new EditAction(this).asMMenuItem()); | |
184 | ||
185 | // contributions from providers | |
186 | model.getProviders().forEach(p -> p.contributeContextMenu(this, ctxMenu)); | |
187 | ||
188 | part.getMenus().add(ctxMenu); | |
189 | ||
190 | menuService.registerContextMenu(tree.getViewer().getControl(), CONTEXT_MENU_ID); | |
191 | } | |
192 | ||
193 | private List<ILaunchMode> getPreSortedLaunchModes() { | |
194 | List<ILaunchMode> modes = new ArrayList<>(); | |
195 | ||
196 | ILaunchMode run = null; | |
197 | ILaunchMode debug = null; | |
198 | ILaunchMode profile = null; | |
199 | ILaunchMode coverage = null; | |
200 | ||
201 | ILaunchMode[] launchModes = DebugPlugin.getDefault().getLaunchManager().getLaunchModes(); | |
202 | List<ILaunchMode> others = new ArrayList<>(); | |
203 | ||
204 | for (ILaunchMode m : launchModes) { | |
205 | switch (m.getIdentifier()) { | |
206 | case "run": //$NON-NLS-1$ | |
207 | run = m; | |
208 | break; | |
209 | case "debug": //$NON-NLS-1$ | |
210 | debug = m; | |
211 | break; | |
212 | case "profile": //$NON-NLS-1$ | |
213 | profile = m; | |
214 | break; | |
215 | case "coverage": //$NON-NLS-1$ | |
216 | coverage = m; | |
217 | break; | |
218 | default: | |
219 | others.add(m); | |
220 | } | |
221 | } | |
222 | ||
223 | if (run != null) { | |
224 | modes.add(run); | |
225 | } | |
226 | if (debug != null) { | |
227 | modes.add(debug); | |
228 | } | |
229 | if (coverage != null) { | |
230 | modes.add(coverage); | |
231 | } | |
232 | if (profile != null) { | |
233 | modes.add(profile); | |
234 | } | |
235 | modes.addAll(others); | |
236 | return modes; | |
237 | } | |
238 | ||
239 | private void queueReset() { | |
240 | resetJob.cancel(); | |
241 | resetJob.schedule(100); | |
242 | } | |
243 | ||
244 | @Override | |
245 | public Set<ILaunchObject> get() { | |
246 | ISelection selection = tree.getViewer().getSelection(); | |
247 | IStructuredSelection structuredSelection = (IStructuredSelection) selection; | |
248 | if (structuredSelection.isEmpty()) { | |
249 | return Collections.emptySet(); | |
250 | } | |
251 | ||
252 | Set<LaunchObjectModel> elements = new TreeSet<>(); | |
253 | // expand selection if containers are selected | |
254 | for (Object selected : structuredSelection.toList()) { | |
255 | if (selected instanceof LaunchObjectContainerModel) { | |
256 | elements.addAll(((LaunchObjectContainerModel) selected).getChildren()); | |
257 | } else if (selected instanceof LaunchObjectModel) { | |
258 | elements.add((LaunchObjectModel) selected); | |
259 | } | |
260 | } | |
261 | ||
262 | return elements.stream().map(m -> m.getObject()).filter(Objects::nonNull).collect(Collectors.toCollection(TreeSet::new)); | |
263 | } | |
264 | ||
265 | private synchronized void reset() { | |
266 | tree.getDisplay().syncExec(() -> { | |
267 | tree.getViewer().getTree().setRedraw(false); | |
268 | try { | |
269 | TreePath[] exp = tree.getViewer().getExpandedTreePaths(); | |
270 | tree.getViewer().setInput(model.getModel()); | |
271 | tree.getViewer().setExpandedTreePaths(exp); | |
272 | } finally { | |
273 | tree.getViewer().getTree().setRedraw(true); | |
274 | } | |
275 | }); | |
276 | } | |
277 | ||
278 | @PreDestroy | |
279 | public void destroy() { | |
280 | model.removeUpdateListener(reset); | |
281 | } | |
282 | ||
283 | private final class RefreshHandler { | |
284 | ||
285 | @Execute | |
286 | public void handle() { | |
287 | reset(); | |
288 | } | |
289 | } | |
290 | ||
291 | private final class TerminateAllHandler { | |
292 | ||
293 | @Execute | |
294 | public void handle() { | |
295 | LaunchObjectContainerModel root = (LaunchObjectContainerModel) tree.getViewer().getInput(); | |
296 | if (root == null) { | |
297 | return; | |
298 | } | |
299 | ||
300 | for (LaunchObjectModel container : root.getChildren()) { | |
301 | if (container instanceof LaunchObjectFavoriteContainerModel) { | |
302 | continue; | |
303 | } | |
304 | ||
305 | if (container instanceof LaunchObjectContainerModel) { | |
306 | for (LaunchObjectModel m : ((LaunchObjectContainerModel) container).getChildren()) { | |
307 | if (m.getObject() == null) { | |
308 | continue; | |
309 | } | |
310 | ||
311 | if (m.getObject().canTerminate()) { | |
312 | m.getObject().terminate(); | |
313 | } | |
314 | } | |
315 | } | |
316 | } | |
317 | } | |
318 | } | |
319 | ||
320 | }⏎ |
+72
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
16 | import org.eclipse.debug.ui.launchview.internal.model.LaunchObjectModel; | |
17 | import org.eclipse.jface.resource.ImageDescriptor; | |
18 | import org.eclipse.jface.resource.ImageRegistry; | |
19 | import org.eclipse.jface.viewers.BaseLabelProvider; | |
20 | import org.eclipse.jface.viewers.DecorationOverlayIcon; | |
21 | import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider; | |
22 | import org.eclipse.jface.viewers.IDecoration; | |
23 | import org.eclipse.jface.viewers.StyledString; | |
24 | import org.eclipse.swt.graphics.Image; | |
25 | import org.eclipse.ui.plugin.AbstractUIPlugin; | |
26 | ||
27 | public class LaunchViewLabelProvider extends BaseLabelProvider implements IStyledLabelProvider { | |
28 | ||
29 | private static final ImageDescriptor ICON_RUNNING = AbstractUIPlugin.imageDescriptorFromPlugin(LaunchViewBundleInfo.PLUGIN_ID, "icons/run_co.png"); //$NON-NLS-1$ | |
30 | ||
31 | private final ImageRegistry perConfig = new ImageRegistry(); | |
32 | ||
33 | @Override | |
34 | public StyledString getStyledText(Object element) { | |
35 | if (element instanceof LaunchObjectModel) { | |
36 | return ((LaunchObjectModel) element).getLabel(); | |
37 | } | |
38 | ||
39 | return null; | |
40 | } | |
41 | ||
42 | @Override | |
43 | public Image getImage(Object element) { | |
44 | if (element instanceof LaunchObjectModel) { | |
45 | LaunchObjectModel obj = (LaunchObjectModel) element; | |
46 | if (obj.getObject() != null && obj.getObject().canTerminate()) { | |
47 | return getCachedRunningImage(obj); | |
48 | } | |
49 | ||
50 | return obj.getImage(); | |
51 | } | |
52 | ||
53 | return null; | |
54 | } | |
55 | ||
56 | private Image getCachedRunningImage(LaunchObjectModel obj) { | |
57 | Image img = perConfig.get(obj.getObject().getId()); | |
58 | if (img == null) { | |
59 | img = new DecorationOverlayIcon(obj.getImage(), ICON_RUNNING, IDecoration.TOP_LEFT).createImage(); | |
60 | perConfig.put(obj.getObject().getId(), img); | |
61 | } | |
62 | return img; | |
63 | } | |
64 | ||
65 | @Override | |
66 | public void dispose() { | |
67 | perConfig.dispose(); | |
68 | super.dispose(); | |
69 | } | |
70 | ||
71 | } |
+53
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
16 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
17 | import org.eclipse.e4.core.di.annotations.CanExecute; | |
18 | import org.eclipse.e4.core.di.annotations.Execute; | |
19 | import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; | |
20 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; | |
21 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem; | |
22 | ||
23 | public class RelaunchAction { | |
24 | ||
25 | private LaunchViewImpl view; | |
26 | ||
27 | public RelaunchAction(LaunchViewImpl view) { | |
28 | this.view = view; | |
29 | } | |
30 | ||
31 | public MMenuItem asMMenuItem() { | |
32 | MDirectMenuItem item = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
33 | item.setLabel(LaunchViewMessages.RelaunchAction_TerminateRelaunch); | |
34 | item.setEnabled(isEnabled()); | |
35 | item.setObject(this); | |
36 | ||
37 | item.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/icons/term_restart.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
38 | ||
39 | return item; | |
40 | } | |
41 | ||
42 | @CanExecute | |
43 | public boolean isEnabled() { | |
44 | return view.get().stream().allMatch(m -> m.canTerminate()); | |
45 | } | |
46 | ||
47 | @Execute | |
48 | public void run() { | |
49 | view.get().stream().forEach(m -> m.relaunch()); | |
50 | } | |
51 | ||
52 | } |
+53
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.internal.view; | |
14 | ||
15 | import org.eclipse.debug.ui.launchview.internal.LaunchViewBundleInfo; | |
16 | import org.eclipse.debug.ui.launchview.internal.LaunchViewMessages; | |
17 | import org.eclipse.e4.core.di.annotations.CanExecute; | |
18 | import org.eclipse.e4.core.di.annotations.Execute; | |
19 | import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; | |
20 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; | |
21 | import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem; | |
22 | ||
23 | public class TerminateAction { | |
24 | ||
25 | private LaunchViewImpl view; | |
26 | ||
27 | public TerminateAction(LaunchViewImpl view) { | |
28 | this.view = view; | |
29 | } | |
30 | ||
31 | public MMenuItem asMMenuItem() { | |
32 | MDirectMenuItem item = MMenuFactory.INSTANCE.createDirectMenuItem(); | |
33 | item.setLabel(LaunchViewMessages.TerminateAction_Terminate); | |
34 | item.setEnabled(isEnabled()); | |
35 | item.setObject(this); | |
36 | ||
37 | item.setIconURI("platform:/plugin/" + LaunchViewBundleInfo.PLUGIN_ID + "/icons/terminate_co.png"); //$NON-NLS-1$ //$NON-NLS-2$ | |
38 | ||
39 | return item; | |
40 | } | |
41 | ||
42 | @CanExecute | |
43 | public boolean isEnabled() { | |
44 | return view.get().stream().allMatch(m -> m.canTerminate()); | |
45 | } | |
46 | ||
47 | @Execute | |
48 | public void run() { | |
49 | view.get().forEach(e -> e.terminate()); | |
50 | } | |
51 | ||
52 | } |
+94
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.services; | |
14 | ||
15 | import org.eclipse.debug.core.ILaunchConfigurationType; | |
16 | import org.eclipse.debug.core.ILaunchMode; | |
17 | import org.eclipse.debug.internal.ui.DebugPluginImages; | |
18 | import org.eclipse.jface.viewers.StyledString; | |
19 | import org.eclipse.swt.graphics.Image; | |
20 | ||
21 | /** | |
22 | * A {@link ILaunchObject} describes a single launch-able "thing". | |
23 | * <p> | |
24 | * Instances of this interface are provided by extensions by a custom | |
25 | * {@link ILaunchObjectProvider} implementation in the extension. | |
26 | * | |
27 | * @since 1.0.2 | |
28 | */ | |
29 | public interface ILaunchObject extends Comparable<ILaunchObject> { | |
30 | ||
31 | /** | |
32 | * @return the unique ID of the {@link ILaunchObject}. | |
33 | */ | |
34 | public String getId(); | |
35 | ||
36 | /** | |
37 | * @return a label for display purposes. | |
38 | */ | |
39 | public StyledString getLabel(); | |
40 | ||
41 | /** | |
42 | * @return an image, usually derived from the type of the launch | |
43 | */ | |
44 | default public Image getImage() { | |
45 | if (getType() == null) { | |
46 | return null; | |
47 | } | |
48 | return DebugPluginImages.getImage(getType().getIdentifier()); | |
49 | } | |
50 | ||
51 | /** | |
52 | * @return the underlying {@link ILaunchConfigurationType} of the launch | |
53 | */ | |
54 | public ILaunchConfigurationType getType(); | |
55 | ||
56 | /** | |
57 | * Launch the {@link ILaunchObject} in the specified mode. | |
58 | * | |
59 | * @param mode in which mode to launch | |
60 | */ | |
61 | public void launch(ILaunchMode mode); | |
62 | ||
63 | /** | |
64 | * @return whether this {@link ILaunchObject} supports termination by the | |
65 | * user. | |
66 | */ | |
67 | public boolean canTerminate(); | |
68 | ||
69 | /** | |
70 | * Terminates all running instances of this {@link ILaunchObject}. | |
71 | */ | |
72 | public void terminate(); | |
73 | ||
74 | /** | |
75 | * First terminates and then launches this {@link ILaunchObject} if it is | |
76 | * running already. | |
77 | */ | |
78 | public void relaunch(); | |
79 | ||
80 | /** | |
81 | * Triggers custom editing UI logic for the {@link ILaunchObject}. Might open | |
82 | * an editor, or a dialog, or do something completely different depending on | |
83 | * the implementation. | |
84 | */ | |
85 | public void edit(); | |
86 | ||
87 | /** | |
88 | * @return whether this {@link ILaunchObject} should be displayed in the | |
89 | * favorite container of the view. | |
90 | */ | |
91 | public boolean isFavorite(); | |
92 | ||
93 | } |
+77
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017, 2019 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.services; | |
14 | ||
15 | import java.util.Set; | |
16 | import java.util.function.Supplier; | |
17 | ||
18 | import org.eclipse.debug.ui.launchview.internal.view.LaunchViewImpl; | |
19 | import org.eclipse.e4.ui.model.application.ui.menu.MMenu; | |
20 | ||
21 | /** | |
22 | * Provides different {@link ILaunchObject} instances to the view for display. | |
23 | * Also allows some interaction with the view by means of an update listener and | |
24 | * menu contributions. | |
25 | * <p> | |
26 | * Contribute extensions to the view by implementing this interface and | |
27 | * registering it as a {@literal @Component} (declarative service). | |
28 | * | |
29 | * @since 1.0.2 | |
30 | */ | |
31 | public interface ILaunchObjectProvider { | |
32 | ||
33 | /** | |
34 | * @return all {@link ILaunchObject}s that this provider contributes to the | |
35 | * view | |
36 | */ | |
37 | public Set<? extends ILaunchObject> getLaunchObjects(); | |
38 | ||
39 | /** | |
40 | * @param r register a {@link Runnable} that should be notified whenever the | |
41 | * provider's state changed. The view will react with refreshing | |
42 | * it's in-memory models. | |
43 | */ | |
44 | public void addUpdateListener(Runnable r); | |
45 | ||
46 | /** | |
47 | * @param r a previously registered update listener {@link Runnable}. | |
48 | */ | |
49 | public void removeUpdateListener(Runnable r); | |
50 | ||
51 | /** | |
52 | * @return the priority of the provider. The default (debug.core) provider | |
53 | * has priority 0. A higher priority means that | |
54 | * {@link ILaunchObject}s with the same type and id will take | |
55 | * precedence. This allows to provide {@link ILaunchObject}s that | |
56 | * will generate {@link ILaunchObject}s in lower priority providers. | |
57 | */ | |
58 | public int getPriority(); | |
59 | ||
60 | /** | |
61 | * @param selected supplier for selected elements in the view. | |
62 | * @param menu the view's menu where items can be contributed. | |
63 | */ | |
64 | public void contributeViewMenu(Supplier<Set<ILaunchObject>> selected, MMenu menu); | |
65 | ||
66 | /** | |
67 | * Contribute per-item context menu items here. Use | |
68 | * {@link LaunchViewImpl#getSelectedElements()} to retrieve selected | |
69 | * elements during CanExecute and Execute methods of menu items. | |
70 | * | |
71 | * @param selected supplier for selected elements in the view. | |
72 | * @param menu the context menu applied to items in the tree. | |
73 | */ | |
74 | public void contributeContextMenu(Supplier<Set<ILaunchObject>> selected, MMenu menu); | |
75 | ||
76 | } |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <classpath> | |
2 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> | |
3 | <attributes> | |
4 | <attribute name="module" value="true"/> | |
5 | </attributes> | |
6 | </classpathentry> | |
7 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | |
8 | <classpathentry kind="src" path="src"/> | |
9 | <classpathentry kind="output" path="bin"/> | |
10 | </classpath> |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <projectDescription> | |
2 | <name>org.eclipse.debug.ui.launchview.tests</name> | |
3 | <comment></comment> | |
4 | <projects> | |
5 | </projects> | |
6 | <buildSpec> | |
7 | <buildCommand> | |
8 | <name>org.eclipse.jdt.core.javabuilder</name> | |
9 | <arguments> | |
10 | </arguments> | |
11 | </buildCommand> | |
12 | <buildCommand> | |
13 | <name>org.eclipse.pde.ManifestBuilder</name> | |
14 | <arguments> | |
15 | </arguments> | |
16 | </buildCommand> | |
17 | <buildCommand> | |
18 | <name>org.eclipse.pde.SchemaBuilder</name> | |
19 | <arguments> | |
20 | </arguments> | |
21 | </buildCommand> | |
22 | </buildSpec> | |
23 | <natures> | |
24 | <nature>org.eclipse.pde.PluginNature</nature> | |
25 | <nature>org.eclipse.jdt.core.javanature</nature> | |
26 | </natures> | |
27 | </projectDescription> |
0 | eclipse.preferences.version=1 | |
1 | org.eclipse.jdt.core.builder.cleanOutputFolder=clean | |
2 | org.eclipse.jdt.core.builder.duplicateResourceTask=warning | |
3 | org.eclipse.jdt.core.builder.invalidClasspath=abort | |
4 | org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore | |
5 | org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch | |
6 | org.eclipse.jdt.core.circularClasspath=error | |
7 | org.eclipse.jdt.core.classpath.exclusionPatterns=enabled | |
8 | org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled | |
9 | org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error | |
10 | org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled | |
11 | org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore | |
12 | org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull | |
13 | org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= | |
14 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault | |
15 | org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= | |
16 | org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable | |
17 | org.eclipse.jdt.core.compiler.annotation.nullable.secondary= | |
18 | org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled | |
19 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | |
20 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | |
21 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | |
22 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | |
23 | org.eclipse.jdt.core.compiler.compliance=11 | |
24 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate | |
25 | org.eclipse.jdt.core.compiler.debug.localVariable=generate | |
26 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate | |
27 | org.eclipse.jdt.core.compiler.doc.comment.support=enabled | |
28 | org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 | |
29 | org.eclipse.jdt.core.compiler.problem.APILeak=warning | |
30 | org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning | |
31 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | |
32 | org.eclipse.jdt.core.compiler.problem.autoboxing=ignore | |
33 | org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning | |
34 | org.eclipse.jdt.core.compiler.problem.deadCode=warning | |
35 | org.eclipse.jdt.core.compiler.problem.deprecation=warning | |
36 | org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled | |
37 | org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled | |
38 | org.eclipse.jdt.core.compiler.problem.discouragedReference=warning | |
39 | org.eclipse.jdt.core.compiler.problem.emptyStatement=warning | |
40 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | |
41 | org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error | |
42 | org.eclipse.jdt.core.compiler.problem.fallthroughCase=error | |
43 | org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled | |
44 | org.eclipse.jdt.core.compiler.problem.fieldHiding=warning | |
45 | org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore | |
46 | org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning | |
47 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore | |
48 | org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning | |
49 | org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled | |
50 | org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning | |
51 | org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error | |
52 | org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning | |
53 | org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore | |
54 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled | |
55 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled | |
56 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled | |
57 | org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private | |
58 | org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning | |
59 | org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning | |
60 | org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning | |
61 | org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning | |
62 | org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled | |
63 | org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning | |
64 | org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore | |
65 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled | |
66 | org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public | |
67 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags | |
68 | org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore | |
69 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled | |
70 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled | |
71 | org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private | |
72 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning | |
73 | org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled | |
74 | org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning | |
75 | org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore | |
76 | org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning | |
77 | org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning | |
78 | org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore | |
79 | org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning | |
80 | org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning | |
81 | org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error | |
82 | org.eclipse.jdt.core.compiler.problem.nullReference=error | |
83 | org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error | |
84 | org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning | |
85 | org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning | |
86 | org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning | |
87 | org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning | |
88 | org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning | |
89 | org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning | |
90 | org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning | |
91 | org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning | |
92 | org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning | |
93 | org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore | |
94 | org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning | |
95 | org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore | |
96 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore | |
97 | org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore | |
98 | org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled | |
99 | org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning | |
100 | org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled | |
101 | org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled | |
102 | org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled | |
103 | org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore | |
104 | org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning | |
105 | org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning | |
106 | org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled | |
107 | org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning | |
108 | org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning | |
109 | org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore | |
110 | org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error | |
111 | org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning | |
112 | org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled | |
113 | org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info | |
114 | org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore | |
115 | org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error | |
116 | org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore | |
117 | org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning | |
118 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning | |
119 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled | |
120 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled | |
121 | org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled | |
122 | org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore | |
123 | org.eclipse.jdt.core.compiler.problem.unusedImport=error | |
124 | org.eclipse.jdt.core.compiler.problem.unusedLabel=warning | |
125 | org.eclipse.jdt.core.compiler.problem.unusedLocal=warning | |
126 | org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore | |
127 | org.eclipse.jdt.core.compiler.problem.unusedParameter=warning | |
128 | org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled | |
129 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled | |
130 | org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled | |
131 | org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error | |
132 | org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore | |
133 | org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning | |
134 | org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning | |
135 | org.eclipse.jdt.core.compiler.source=11 | |
136 | org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled | |
137 | org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH | |
138 | org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING | |
139 | org.eclipse.jdt.core.formatter.align_type_members_on_columns=false | |
140 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 | |
141 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 | |
142 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 | |
143 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0 | |
144 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0 | |
145 | org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0 | |
146 | org.eclipse.jdt.core.formatter.alignment_for_assignment=0 | |
147 | org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0 | |
148 | org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 | |
149 | org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 | |
150 | org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 | |
151 | org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=32 | |
152 | org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 | |
153 | org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 | |
154 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0 | |
155 | org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0 | |
156 | org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=0 | |
157 | org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0 | |
158 | org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 | |
159 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 | |
160 | org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 | |
161 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0 | |
162 | org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 | |
163 | org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=0 | |
164 | org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 | |
165 | org.eclipse.jdt.core.formatter.blank_lines_after_package=1 | |
166 | org.eclipse.jdt.core.formatter.blank_lines_before_field=0 | |
167 | org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 | |
168 | org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 | |
169 | org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 | |
170 | org.eclipse.jdt.core.formatter.blank_lines_before_method=1 | |
171 | org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 | |
172 | org.eclipse.jdt.core.formatter.blank_lines_before_package=0 | |
173 | org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 | |
174 | org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 | |
175 | org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line | |
176 | org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line | |
177 | org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line | |
178 | org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line | |
179 | org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line | |
180 | org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line | |
181 | org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line | |
182 | org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line | |
183 | org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line | |
184 | org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line | |
185 | org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line | |
186 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true | |
187 | org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false | |
188 | org.eclipse.jdt.core.formatter.comment.format_block_comments=true | |
189 | org.eclipse.jdt.core.formatter.comment.format_header=false | |
190 | org.eclipse.jdt.core.formatter.comment.format_html=true | |
191 | org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true | |
192 | org.eclipse.jdt.core.formatter.comment.format_line_comments=true | |
193 | org.eclipse.jdt.core.formatter.comment.format_source_code=true | |
194 | org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true | |
195 | org.eclipse.jdt.core.formatter.comment.indent_root_tags=true | |
196 | org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert | |
197 | org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert | |
198 | org.eclipse.jdt.core.formatter.comment.line_length=80 | |
199 | org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true | |
200 | org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true | |
201 | org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false | |
202 | org.eclipse.jdt.core.formatter.compact_else_if=true | |
203 | org.eclipse.jdt.core.formatter.continuation_indentation=2 | |
204 | org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 | |
205 | org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off | |
206 | org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on | |
207 | org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false | |
208 | org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true | |
209 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true | |
210 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true | |
211 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true | |
212 | org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true | |
213 | org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true | |
214 | org.eclipse.jdt.core.formatter.indent_empty_lines=false | |
215 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true | |
216 | org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true | |
217 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true | |
218 | org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true | |
219 | org.eclipse.jdt.core.formatter.indentation.size=4 | |
220 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert | |
221 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert | |
222 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert | |
223 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert | |
224 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert | |
225 | org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert | |
226 | org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert | |
227 | org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert | |
228 | org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert | |
229 | org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert | |
230 | org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert | |
231 | org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert | |
232 | org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert | |
233 | org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert | |
234 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert | |
235 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert | |
236 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert | |
237 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert | |
238 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert | |
239 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert | |
240 | org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert | |
241 | org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert | |
242 | org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert | |
243 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert | |
244 | org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert | |
245 | org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert | |
246 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert | |
247 | org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert | |
248 | org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert | |
249 | org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert | |
250 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert | |
251 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert | |
252 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert | |
253 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert | |
254 | org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert | |
255 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert | |
256 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert | |
257 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert | |
258 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert | |
259 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert | |
260 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert | |
261 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert | |
262 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert | |
263 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert | |
264 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert | |
265 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert | |
266 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert | |
267 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert | |
268 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert | |
269 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert | |
270 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert | |
271 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert | |
272 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert | |
273 | org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert | |
274 | org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert | |
275 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert | |
276 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert | |
277 | org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert | |
278 | org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert | |
279 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert | |
280 | org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert | |
281 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert | |
282 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert | |
283 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert | |
284 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert | |
285 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert | |
286 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert | |
287 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert | |
288 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert | |
289 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert | |
290 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert | |
291 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert | |
292 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert | |
293 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert | |
294 | org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert | |
295 | org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert | |
296 | org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert | |
297 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert | |
298 | org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert | |
299 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert | |
300 | org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert | |
301 | org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert | |
302 | org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert | |
303 | org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert | |
304 | org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert | |
305 | org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert | |
306 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert | |
307 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert | |
308 | org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert | |
309 | org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert | |
310 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert | |
311 | org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert | |
312 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert | |
313 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert | |
314 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert | |
315 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert | |
316 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert | |
317 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert | |
318 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert | |
319 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert | |
320 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert | |
321 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert | |
322 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert | |
323 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert | |
324 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert | |
325 | org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert | |
326 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert | |
327 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert | |
328 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert | |
329 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert | |
330 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert | |
331 | org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert | |
332 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert | |
333 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert | |
334 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert | |
335 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert | |
336 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert | |
337 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert | |
338 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert | |
339 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert | |
340 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert | |
341 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert | |
342 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert | |
343 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert | |
344 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert | |
345 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert | |
346 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert | |
347 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert | |
348 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert | |
349 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert | |
350 | org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert | |
351 | org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert | |
352 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert | |
353 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert | |
354 | org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert | |
355 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert | |
356 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert | |
357 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert | |
358 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert | |
359 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert | |
360 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert | |
361 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert | |
362 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert | |
363 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert | |
364 | org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert | |
365 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert | |
366 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert | |
367 | org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert | |
368 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert | |
369 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert | |
370 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert | |
371 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert | |
372 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert | |
373 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert | |
374 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert | |
375 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert | |
376 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert | |
377 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert | |
378 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert | |
379 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert | |
380 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert | |
381 | org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert | |
382 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert | |
383 | org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert | |
384 | org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert | |
385 | org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert | |
386 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert | |
387 | org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert | |
388 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert | |
389 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert | |
390 | org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert | |
391 | org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert | |
392 | org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert | |
393 | org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert | |
394 | org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert | |
395 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert | |
396 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert | |
397 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert | |
398 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert | |
399 | org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert | |
400 | org.eclipse.jdt.core.formatter.join_lines_in_comments=true | |
401 | org.eclipse.jdt.core.formatter.join_wrapped_lines=true | |
402 | org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false | |
403 | org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false | |
404 | org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false | |
405 | org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false | |
406 | org.eclipse.jdt.core.formatter.lineSplit=80 | |
407 | org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false | |
408 | org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false | |
409 | org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 | |
410 | org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 | |
411 | org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true | |
412 | org.eclipse.jdt.core.formatter.tabulation.char=tab | |
413 | org.eclipse.jdt.core.formatter.tabulation.size=4 | |
414 | org.eclipse.jdt.core.formatter.use_on_off_tags=false | |
415 | org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false | |
416 | org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true | |
417 | org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true | |
418 | org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true | |
419 | org.eclipse.jdt.core.incompatibleJDKLevel=ignore | |
420 | org.eclipse.jdt.core.incompleteClasspath=error |
0 | cleanup.add_default_serial_version_id=true | |
1 | cleanup.add_generated_serial_version_id=false | |
2 | cleanup.add_missing_annotations=true | |
3 | cleanup.add_missing_deprecated_annotations=true | |
4 | cleanup.add_missing_methods=false | |
5 | cleanup.add_missing_nls_tags=false | |
6 | cleanup.add_missing_override_annotations=true | |
7 | cleanup.add_missing_override_annotations_interface_methods=true | |
8 | cleanup.add_serial_version_id=false | |
9 | cleanup.always_use_blocks=true | |
10 | cleanup.always_use_parentheses_in_expressions=false | |
11 | cleanup.always_use_this_for_non_static_field_access=false | |
12 | cleanup.always_use_this_for_non_static_method_access=false | |
13 | cleanup.convert_to_enhanced_for_loop=false | |
14 | cleanup.correct_indentation=false | |
15 | cleanup.format_source_code=true | |
16 | cleanup.format_source_code_changes_only=false | |
17 | cleanup.make_local_variable_final=true | |
18 | cleanup.make_parameters_final=false | |
19 | cleanup.make_private_fields_final=true | |
20 | cleanup.make_type_abstract_if_missing_method=false | |
21 | cleanup.make_variable_declarations_final=false | |
22 | cleanup.never_use_blocks=false | |
23 | cleanup.never_use_parentheses_in_expressions=true | |
24 | cleanup.organize_imports=true | |
25 | cleanup.qualify_static_field_accesses_with_declaring_class=false | |
26 | cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true | |
27 | cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true | |
28 | cleanup.qualify_static_member_accesses_with_declaring_class=true | |
29 | cleanup.qualify_static_method_accesses_with_declaring_class=false | |
30 | cleanup.remove_private_constructors=true | |
31 | cleanup.remove_trailing_whitespaces=true | |
32 | cleanup.remove_trailing_whitespaces_all=true | |
33 | cleanup.remove_trailing_whitespaces_ignore_empty=false | |
34 | cleanup.remove_unnecessary_casts=true | |
35 | cleanup.remove_unnecessary_nls_tags=true | |
36 | cleanup.remove_unused_imports=true | |
37 | cleanup.remove_unused_local_variables=false | |
38 | cleanup.remove_unused_private_fields=true | |
39 | cleanup.remove_unused_private_members=false | |
40 | cleanup.remove_unused_private_methods=true | |
41 | cleanup.remove_unused_private_types=true | |
42 | cleanup.sort_members=false | |
43 | cleanup.sort_members_all=false | |
44 | cleanup.use_blocks=true | |
45 | cleanup.use_blocks_only_for_return_and_throw=false | |
46 | cleanup.use_parentheses_in_expressions=false | |
47 | cleanup.use_this_for_non_static_field_access=false | |
48 | cleanup.use_this_for_non_static_field_access_only_if_necessary=true | |
49 | cleanup.use_this_for_non_static_method_access=false | |
50 | cleanup.use_this_for_non_static_method_access_only_if_necessary=true | |
51 | cleanup_profile=_Platform Debug Cleanups | |
52 | cleanup_settings_version=2 | |
53 | eclipse.preferences.version=1 | |
54 | editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true | |
55 | formatter_profile=_Platform Debug Formatting | |
56 | formatter_settings_version=12 | |
57 | sp_cleanup.add_default_serial_version_id=true | |
58 | sp_cleanup.add_generated_serial_version_id=false | |
59 | sp_cleanup.add_missing_annotations=true | |
60 | sp_cleanup.add_missing_deprecated_annotations=true | |
61 | sp_cleanup.add_missing_methods=false | |
62 | sp_cleanup.add_missing_nls_tags=false | |
63 | sp_cleanup.add_missing_override_annotations=true | |
64 | sp_cleanup.add_missing_override_annotations_interface_methods=true | |
65 | sp_cleanup.add_serial_version_id=false | |
66 | sp_cleanup.always_use_blocks=true | |
67 | sp_cleanup.always_use_parentheses_in_expressions=false | |
68 | sp_cleanup.always_use_this_for_non_static_field_access=false | |
69 | sp_cleanup.always_use_this_for_non_static_method_access=false | |
70 | sp_cleanup.convert_functional_interfaces=false | |
71 | sp_cleanup.convert_to_enhanced_for_loop=false | |
72 | sp_cleanup.correct_indentation=false | |
73 | sp_cleanup.format_source_code=true | |
74 | sp_cleanup.format_source_code_changes_only=true | |
75 | sp_cleanup.insert_inferred_type_arguments=false | |
76 | sp_cleanup.make_local_variable_final=false | |
77 | sp_cleanup.make_parameters_final=false | |
78 | sp_cleanup.make_private_fields_final=true | |
79 | sp_cleanup.make_type_abstract_if_missing_method=false | |
80 | sp_cleanup.make_variable_declarations_final=false | |
81 | sp_cleanup.never_use_blocks=false | |
82 | sp_cleanup.never_use_parentheses_in_expressions=true | |
83 | sp_cleanup.on_save_use_additional_actions=true | |
84 | sp_cleanup.organize_imports=false | |
85 | sp_cleanup.qualify_static_field_accesses_with_declaring_class=false | |
86 | sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true | |
87 | sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true | |
88 | sp_cleanup.qualify_static_member_accesses_with_declaring_class=false | |
89 | sp_cleanup.qualify_static_method_accesses_with_declaring_class=false | |
90 | sp_cleanup.remove_private_constructors=true | |
91 | sp_cleanup.remove_redundant_type_arguments=false | |
92 | sp_cleanup.remove_trailing_whitespaces=true | |
93 | sp_cleanup.remove_trailing_whitespaces_all=true | |
94 | sp_cleanup.remove_trailing_whitespaces_ignore_empty=false | |
95 | sp_cleanup.remove_unnecessary_casts=true | |
96 | sp_cleanup.remove_unnecessary_nls_tags=true | |
97 | sp_cleanup.remove_unused_imports=true | |
98 | sp_cleanup.remove_unused_local_variables=false | |
99 | sp_cleanup.remove_unused_private_fields=true | |
100 | sp_cleanup.remove_unused_private_members=false | |
101 | sp_cleanup.remove_unused_private_methods=true | |
102 | sp_cleanup.remove_unused_private_types=true | |
103 | sp_cleanup.sort_members=false | |
104 | sp_cleanup.sort_members_all=false | |
105 | sp_cleanup.use_anonymous_class_creation=false | |
106 | sp_cleanup.use_blocks=true | |
107 | sp_cleanup.use_blocks_only_for_return_and_throw=false | |
108 | sp_cleanup.use_lambda=false | |
109 | sp_cleanup.use_parentheses_in_expressions=false | |
110 | sp_cleanup.use_this_for_non_static_field_access=false | |
111 | sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true | |
112 | sp_cleanup.use_this_for_non_static_method_access=false | |
113 | sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true | |
114 | sp_cleanup.use_type_arguments=false |
0 | compilers.f.unresolved-features=1 | |
1 | compilers.f.unresolved-plugins=1 | |
2 | compilers.incompatible-environment=1 | |
3 | compilers.p.build=1 | |
4 | compilers.p.build.bin.includes=1 | |
5 | compilers.p.build.encodings=2 | |
6 | compilers.p.build.java.compiler=2 | |
7 | compilers.p.build.java.compliance=1 | |
8 | compilers.p.build.missing.output=1 | |
9 | compilers.p.build.output.library=1 | |
10 | compilers.p.build.source.library=1 | |
11 | compilers.p.build.src.includes=1 | |
12 | compilers.p.deprecated=2 | |
13 | compilers.p.discouraged-class=1 | |
14 | compilers.p.exec-env-too-low=1 | |
15 | compilers.p.illegal-att-value=0 | |
16 | compilers.p.internal=1 | |
17 | compilers.p.matching-pom-version=0 | |
18 | compilers.p.missing-packages=2 | |
19 | compilers.p.missing-version-export-package=2 | |
20 | compilers.p.missing-version-import-package=2 | |
21 | compilers.p.missing-version-require-bundle=2 | |
22 | compilers.p.no-required-att=0 | |
23 | compilers.p.no.automatic.module=1 | |
24 | compilers.p.not-externalized-att=0 | |
25 | compilers.p.service.component.without.lazyactivation=1 | |
26 | compilers.p.unknown-attribute=0 | |
27 | compilers.p.unknown-class=1 | |
28 | compilers.p.unknown-element=2 | |
29 | compilers.p.unknown-identifier=1 | |
30 | compilers.p.unknown-resource=0 | |
31 | compilers.p.unresolved-ex-points=0 | |
32 | compilers.p.unresolved-import=0 | |
33 | compilers.p.unused-element-or-attribute=1 | |
34 | compilers.s.create-docs=false | |
35 | compilers.s.doc-folder=doc | |
36 | compilers.s.open-tags=1 | |
37 | compilers.use-project=true | |
38 | eclipse.preferences.version=1 |
0 | Manifest-Version: 1.0 | |
1 | Bundle-ManifestVersion: 2 | |
2 | Bundle-Name: %pluginName | |
3 | Bundle-SymbolicName: org.eclipse.debug.ui.launchview.tests;singleton:=true | |
4 | Bundle-Version: 1.0.0.qualifier | |
5 | Bundle-Activator: org.eclipse.debug.ui.launchview.tests.TestsPlugin | |
6 | Bundle-Localization: plugin | |
7 | Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)", | |
8 | org.eclipse.core.runtime;bundle-version="[3.11.0,4.0.0)", | |
9 | org.eclipse.debug.ui;bundle-version="[3.10.0,4.0.0)", | |
10 | org.eclipse.debug.ui.launchview;bundle-version="[1.0.2,2.0.0)", | |
11 | org.junit, | |
12 | org.eclipse.test.performance;bundle-version="3.6.0", | |
13 | org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)", | |
14 | org.eclipse.debug.core;bundle-version="[3.9.0,4.0.0)" | |
15 | Bundle-ActivationPolicy: lazy | |
16 | Bundle-RequiredExecutionEnvironment: JavaSE-11 | |
17 | Bundle-Vendor: %providerName | |
18 | Eclipse-BundleShape: dir | |
19 | Automatic-Module-Name: org.eclipse.debug.ui.launchview.tests |
+41
-0
0 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
1 | <launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig"> | |
2 | <booleanAttribute key="append.args" value="true"/> | |
3 | <booleanAttribute key="askclear" value="false"/> | |
4 | <booleanAttribute key="automaticAdd" value="true"/> | |
5 | <booleanAttribute key="automaticValidate" value="false"/> | |
6 | <stringAttribute key="bootstrap" value=""/> | |
7 | <stringAttribute key="checked" value="[NONE]"/> | |
8 | <booleanAttribute key="clearConfig" value="true"/> | |
9 | <booleanAttribute key="clearws" value="true"/> | |
10 | <booleanAttribute key="clearwslog" value="false"/> | |
11 | <stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/> | |
12 | <booleanAttribute key="default" value="true"/> | |
13 | <booleanAttribute key="includeOptional" value="true"/> | |
14 | <stringAttribute key="location" value="${workspace_loc}/../debug-junit-workspace"/> | |
15 | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | |
16 | <listEntry value="/org.eclipse.debug.ui.launchview.tests/src/org/eclipse/debug/ui/launchview/tests/AutomatedSuite.java"/> | |
17 | </listAttribute> | |
18 | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | |
19 | <listEntry value="1"/> | |
20 | </listAttribute> | |
21 | <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/> | |
22 | <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | |
23 | <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | |
24 | <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> | |
25 | <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> | |
26 | <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.debug.ui.launchview.tests.AutomatedSuite"/> | |
27 | <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/> | |
28 | <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.debug.ui.launchview.tests"/> | |
29 | <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/> | |
30 | <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx384m"/> | |
31 | <stringAttribute key="pde.version" value="3.3"/> | |
32 | <stringAttribute key="product" value="org.eclipse.sdk.ide"/> | |
33 | <booleanAttribute key="run_in_ui_thread" value="true"/> | |
34 | <booleanAttribute key="show_selected_only" value="false"/> | |
35 | <booleanAttribute key="tracing" value="false"/> | |
36 | <booleanAttribute key="useCustomFeatures" value="false"/> | |
37 | <booleanAttribute key="useDefaultConfig" value="true"/> | |
38 | <booleanAttribute key="useDefaultConfigArea" value="false"/> | |
39 | <booleanAttribute key="useProduct" value="true"/> | |
40 | </launchConfiguration> |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
1 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | |
5 | <title>About</title> | |
6 | </head> | |
7 | <body lang="EN-US"> | |
8 | <h2>About This Content</h2> | |
9 | ||
10 | <p>November 30, 2017</p> | |
11 | <h3>License</h3> | |
12 | ||
13 | <p> | |
14 | The Eclipse Foundation makes available all content in this plug-in | |
15 | ("Content"). Unless otherwise indicated below, the Content | |
16 | is provided to you under the terms and conditions of the Eclipse | |
17 | Public License Version 2.0 ("EPL"). A copy of the EPL is | |
18 | available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. | |
19 | For purposes of the EPL, "Program" will mean the Content. | |
20 | </p> | |
21 | ||
22 | <p> | |
23 | If you did not receive this Content directly from the Eclipse | |
24 | Foundation, the Content is being redistributed by another party | |
25 | ("Redistributor") and different terms and conditions may | |
26 | apply to your use of any object code in the Content. Check the | |
27 | Redistributor's license that was provided with the Content. If no such | |
28 | license exists, contact the Redistributor. Unless otherwise indicated | |
29 | below, the terms and conditions of the EPL still apply to any source | |
30 | code in the Content and such source code may be obtained at <a | |
31 | href="http://www.eclipse.org/">http://www.eclipse.org</a>. | |
32 | </p> | |
33 | ||
34 | </body> | |
35 | </html>⏎ |
0 | ############################################################################### | |
1 | # Copyright (c) 2009, 2012 IBM Corporation and others. | |
2 | # | |
3 | # This program and the accompanying materials | |
4 | # are made available under the terms of the Eclipse Public License 2.0 | |
5 | # which accompanies this distribution, and is available at | |
6 | # https://www.eclipse.org/legal/epl-2.0/ | |
7 | # | |
8 | # SPDX-License-Identifier: EPL-2.0 | |
9 | # | |
10 | # Contributors: | |
11 | # IBM Corporation - initial API and implementation | |
12 | ############################################################################### | |
13 | source.. = src/ | |
14 | output.. = bin/ | |
15 | bin.includes = META-INF/,\ | |
16 | .,\ | |
17 | test.xml,\ | |
18 | about.html,\ | |
19 | plugin.properties,\ | |
20 | plugin.xml | |
21 |
0 | # To force a version qualifier update, add the bug here |
0 | ############################################################################### | |
1 | # Copyright (c) 2009, 2012 IBM Corporation and others. | |
2 | # | |
3 | # This program and the accompanying materials | |
4 | # are made available under the terms of the Eclipse Public License 2.0 | |
5 | # which accompanies this distribution, and is available at | |
6 | # https://www.eclipse.org/legal/epl-2.0/ | |
7 | # | |
8 | # SPDX-License-Identifier: EPL-2.0 | |
9 | # | |
10 | # Contributors: | |
11 | # IBM Corporation - Initial implementation | |
12 | ############################################################################### | |
13 | ||
14 | pluginName=Debug UI (LaunchView) Test Plugin | |
15 | providerName=Eclipse.org | |
16 |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <?eclipse version="3.4"?> | |
2 | <!-- | |
3 | Copyright (c) 2009, 2020 IBM Corporation and others. | |
4 | ||
5 | This program and the accompanying materials | |
6 | are made available under the terms of the Eclipse Public License 2.0 | |
7 | which accompanies this distribution, and is available at | |
8 | https://www.eclipse.org/legal/epl-2.0/ | |
9 | ||
10 | SPDX-License-Identifier: EPL-2.0 | |
11 | ||
12 | Contributors: | |
13 | IBM Corporation - initial API and implementation | |
14 | --> | |
15 | ||
16 | <plugin> | |
17 | ||
18 | </plugin> |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- | |
2 | Copyright (c) 2012, 2021 Eclipse Foundation and others. | |
3 | All rights reserved. This program and the accompanying materials | |
4 | are made available under the terms of the Eclipse Distribution License v1.0 | |
5 | which accompanies this distribution, and is available at | |
6 | http://www.eclipse.org/org/documents/edl-v10.php | |
7 | ||
8 | Contributors: | |
9 | Igor Fedorenko - initial implementation | |
10 | --> | |
11 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
12 | <modelVersion>4.0.0</modelVersion> | |
13 | <parent> | |
14 | <artifactId>eclipse.platform.debug</artifactId> | |
15 | <groupId>eclipse.platform.debug</groupId> | |
16 | <version>4.22.0-SNAPSHOT</version> | |
17 | </parent> | |
18 | <groupId>org.eclipse.debug</groupId> | |
19 | <artifactId>org.eclipse.debug.ui.launchview.tests</artifactId> | |
20 | <version>1.0.0-SNAPSHOT</version> | |
21 | <packaging>eclipse-test-plugin</packaging> | |
22 | <properties> | |
23 | <skipAPIAnalysis>true</skipAPIAnalysis> | |
24 | <code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings> | |
25 | <testSuite>${project.artifactId}</testSuite> | |
26 | <testClass>org.eclipse.debug.ui.launchview.tests.AutomatedSuite</testClass> | |
27 | </properties> | |
28 | <build> | |
29 | <plugins> | |
30 | <plugin> | |
31 | <groupId>org.eclipse.tycho</groupId> | |
32 | <artifactId>tycho-surefire-plugin</artifactId> | |
33 | <version>${tycho.version}</version> | |
34 | <configuration> | |
35 | <useUIHarness>true</useUIHarness> | |
36 | <useUIThread>true</useUIThread> | |
37 | <dependencies> | |
38 | <dependency> | |
39 | <!-- workaround for missing dependency in org.eclipse.e4.ui.services: https://bugs.eclipse.org/462862 --> | |
40 | <type>eclipse-plugin</type> | |
41 | <artifactId>org.eclipse.equinox.event</artifactId> | |
42 | <version>0.0.0</version> | |
43 | </dependency> | |
44 | </dependencies> | |
45 | </configuration> | |
46 | </plugin> | |
47 | </plugins> | |
48 | </build> | |
49 | </project> |
+169
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017 Andrey Loskutov and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * Andrey Loskutov <loskutov@gmx.de> - initial API and implementation | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.tests; | |
14 | ||
15 | import java.util.function.Function; | |
16 | ||
17 | import org.eclipse.core.runtime.IProgressMonitor; | |
18 | import org.eclipse.core.runtime.IStatus; | |
19 | import org.eclipse.core.runtime.Status; | |
20 | import org.eclipse.core.runtime.jobs.Job; | |
21 | import org.eclipse.jface.preference.IPreferenceStore; | |
22 | import org.eclipse.jface.preference.PreferenceMemento; | |
23 | import org.eclipse.swt.widgets.Display; | |
24 | import org.eclipse.ui.IWorkbench; | |
25 | import org.eclipse.ui.IWorkbenchWindow; | |
26 | import org.eclipse.ui.PlatformUI; | |
27 | import org.eclipse.ui.intro.IIntroManager; | |
28 | import org.eclipse.ui.intro.IIntroPart; | |
29 | import org.eclipse.ui.progress.UIJob; | |
30 | import org.junit.After; | |
31 | import org.junit.Before; | |
32 | import org.junit.Rule; | |
33 | import org.junit.rules.TestName; | |
34 | ||
35 | public class AbstractLaunchViewTest { | |
36 | ||
37 | private static boolean welcomeClosed; | |
38 | ||
39 | /** | |
40 | * Default timeout in milliseconds to wait on some events | |
41 | */ | |
42 | protected long testTimeout = 30000; | |
43 | ||
44 | /** | |
45 | * Preference helper to restore changed preference values after test run. | |
46 | */ | |
47 | private final PreferenceMemento prefMemento = new PreferenceMemento(); | |
48 | ||
49 | @Rule | |
50 | public TestName name = new TestName(); | |
51 | ||
52 | ||
53 | @Before | |
54 | public void setUp() throws Exception { | |
55 | TestUtil.log(IStatus.INFO, name.getMethodName(), "setUp"); | |
56 | assertWelcomeScreenClosed(); | |
57 | } | |
58 | ||
59 | @After | |
60 | public void tearDown() throws Exception { | |
61 | TestUtil.log(IStatus.INFO, name.getMethodName(), "tearDown"); | |
62 | TestUtil.cleanUp(name.getMethodName()); | |
63 | prefMemento.resetPreferences(); | |
64 | } | |
65 | ||
66 | /** | |
67 | * Ensure the welcome screen is closed because in 4.x the debug perspective | |
68 | * opens a giant fast-view causing issues | |
69 | * | |
70 | * @throws Exception | |
71 | */ | |
72 | protected final void assertWelcomeScreenClosed() throws Exception { | |
73 | if (!welcomeClosed && PlatformUI.isWorkbenchRunning()) { | |
74 | final IWorkbench wb = PlatformUI.getWorkbench(); | |
75 | if (wb == null) { | |
76 | return; | |
77 | } | |
78 | // In UI thread we don't need to run a job | |
79 | if (Display.getCurrent() != null) { | |
80 | closeIntro(wb); | |
81 | return; | |
82 | } | |
83 | ||
84 | UIJob job = new UIJob("close welcome screen for debug test suite") { | |
85 | @Override | |
86 | public IStatus runInUIThread(IProgressMonitor monitor) { | |
87 | closeIntro(wb); | |
88 | return Status.OK_STATUS; | |
89 | } | |
90 | ||
91 | }; | |
92 | job.setPriority(Job.INTERACTIVE); | |
93 | job.setSystem(true); | |
94 | job.schedule(); | |
95 | } | |
96 | } | |
97 | ||
98 | /** | |
99 | * Waits while given condition is {@code true} for a given amount of | |
100 | * milliseconds. If the actual wait time exceeds given timeout and condition | |
101 | * will be still {@code true}, throws {@link AssertionFailedError} with | |
102 | * given message. | |
103 | * <p> | |
104 | * Will process UI events while waiting in UI thread, if called from | |
105 | * background thread, just waits. | |
106 | * | |
107 | * @param condition function which will be evaluated while waiting | |
108 | * @param timeout max wait time in milliseconds to wait on given condition | |
109 | * @param errorMessage message which will be used to construct the failure | |
110 | * exception in case the condition will still return {@code true} | |
111 | * after given timeout | |
112 | */ | |
113 | public void waitWhile(Function<AbstractLaunchViewTest, Boolean> condition, long timeout, Function<AbstractLaunchViewTest, String> errorMessage) throws Exception { | |
114 | TestUtil.waitWhile(condition, this, timeout, errorMessage); | |
115 | } | |
116 | ||
117 | /** | |
118 | * Waits while given condition is {@code true} for some time. If the actual | |
119 | * wait time exceeds {@link #testTimeout} and condition will be still | |
120 | * {@code true}, throws {@link AssertionFailedError} with given message. | |
121 | * <p> | |
122 | * Will process UI events while waiting in UI thread, if called from | |
123 | * background thread, just waits. | |
124 | * | |
125 | * @param condition function which will be evaluated while waiting | |
126 | * @param errorMessage message which will be used to construct the failure | |
127 | * exception in case the condition will still return {@code true} | |
128 | * after given timeout | |
129 | */ | |
130 | public void waitWhile(Function<AbstractLaunchViewTest, Boolean> condition, Function<AbstractLaunchViewTest, String> errorMessage) throws Exception { | |
131 | TestUtil.waitWhile(condition, this, testTimeout, errorMessage); | |
132 | } | |
133 | ||
134 | private static void closeIntro(final IWorkbench wb) { | |
135 | IWorkbenchWindow window = wb.getActiveWorkbenchWindow(); | |
136 | if (window != null) { | |
137 | IIntroManager im = wb.getIntroManager(); | |
138 | IIntroPart intro = im.getIntro(); | |
139 | if (intro != null) { | |
140 | welcomeClosed = im.closeIntro(intro); | |
141 | } | |
142 | } | |
143 | } | |
144 | ||
145 | /** | |
146 | * Change a preference value for this test run. The preference will be reset | |
147 | * to its value before test started automatically on {@link #tearDown()}. | |
148 | * | |
149 | * @param <T> preference value type. The type must have a corresponding | |
150 | * {@link IPreferenceStore} setter. | |
151 | * @param store preference store to manipulate (must not be | |
152 | * <code>null</code>) | |
153 | * @param name preference to change | |
154 | * @param value new preference value | |
155 | * @throws IllegalArgumentException when setting a type which is not | |
156 | * supported by {@link IPreferenceStore} | |
157 | * | |
158 | * @see IPreferenceStore#setValue(String, double) | |
159 | * @see IPreferenceStore#setValue(String, float) | |
160 | * @see IPreferenceStore#setValue(String, int) | |
161 | * @see IPreferenceStore#setValue(String, long) | |
162 | * @see IPreferenceStore#setValue(String, boolean) | |
163 | * @see IPreferenceStore#setValue(String, String) | |
164 | */ | |
165 | protected <T> void setPreference(IPreferenceStore store, String name, T value) { | |
166 | prefMemento.setValue(store, name, value); | |
167 | } | |
168 | } |
+33
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2009, 2020 IBM Corporation and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * IBM Corporation - initial API and implementation | |
12 | * Freescale Semiconductor - Bug 293618, Breakpoints view sorts up to first colon only | |
13 | * Anton Kosyakov (Itemis AG) - Bug 438621 - [step filtering] Provide an extension point to enhance methods step filtering. | |
14 | *******************************************************************************/ | |
15 | package org.eclipse.debug.ui.launchview.tests; | |
16 | ||
17 | import org.eclipse.debug.ui.launchview.tests.launchview.LaunchViewSmokeTest; | |
18 | import org.junit.runner.RunWith; | |
19 | import org.junit.runners.Suite; | |
20 | ||
21 | /** | |
22 | * Tests for integration and nightly builds. | |
23 | * | |
24 | * @since 1.0 | |
25 | */ | |
26 | @RunWith(Suite.class) | |
27 | @Suite.SuiteClasses({ | |
28 | // Launch Configuration View | |
29 | LaunchViewSmokeTest.class, | |
30 | }) | |
31 | public class AutomatedSuite { | |
32 | } |
+303
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2017 Google, Inc and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * Stefan Xenos (Google) - Initial implementation | |
12 | * Andrey Loskutov (loskutov@gmx.de) - many different extensions | |
13 | *******************************************************************************/ | |
14 | package org.eclipse.debug.ui.launchview.tests; | |
15 | ||
16 | import static org.junit.Assert.fail; | |
17 | ||
18 | import java.lang.management.ManagementFactory; | |
19 | import java.lang.management.ThreadInfo; | |
20 | import java.util.ArrayList; | |
21 | import java.util.Collections; | |
22 | import java.util.LinkedHashSet; | |
23 | import java.util.List; | |
24 | import java.util.Set; | |
25 | import java.util.function.Function; | |
26 | import java.util.function.Supplier; | |
27 | ||
28 | import org.eclipse.core.runtime.IStatus; | |
29 | import org.eclipse.core.runtime.Status; | |
30 | import org.eclipse.core.runtime.jobs.Job; | |
31 | import org.eclipse.swt.widgets.Display; | |
32 | import org.junit.Assert; | |
33 | ||
34 | ||
35 | public class TestUtil { | |
36 | ||
37 | /** | |
38 | * Call this in the tearDown method of every test to clean up state that can | |
39 | * otherwise leak through SWT between tests. | |
40 | */ | |
41 | public static void cleanUp(String owner) { | |
42 | // Ensure that the Thread.interrupted() flag didn't leak. | |
43 | Assert.assertFalse("The main thread should not be interrupted at the end of a test", Thread.interrupted()); | |
44 | ||
45 | // Wait for any outstanding jobs to finish. Protect against deadlock by | |
46 | // terminating the wait after a timeout. | |
47 | boolean timedOut = waitForJobs(owner, 5, 5000); | |
48 | if (timedOut) { | |
49 | // We don't expect any extra jobs run during the test: try to cancel them | |
50 | log(IStatus.INFO, owner, "Trying to cancel running jobs: " + getRunningOrWaitingJobs(null)); | |
51 | getRunningOrWaitingJobs(null).forEach(Job::cancel); | |
52 | waitForJobs(owner, 5, 1000); | |
53 | } | |
54 | ||
55 | // Ensure that the Thread.interrupted() flag didn't leak. | |
56 | Assert.assertFalse("The main thread should not be interrupted at the end of a test", Thread.interrupted()); | |
57 | } | |
58 | ||
59 | public static void log(int severity, String owner, String message, Throwable... optionalError) { | |
60 | message = "[" + owner + "] " + message; | |
61 | Throwable error = null; | |
62 | if (optionalError != null && optionalError.length > 0) { | |
63 | error = optionalError[0]; | |
64 | } | |
65 | Status status = new Status(severity, TestsPlugin.getDefault().getBundle().getSymbolicName(), message, error); | |
66 | TestsPlugin.getDefault().getLog().log(status); | |
67 | } | |
68 | ||
69 | /** | |
70 | * Process all queued UI events. If called from background thread, does | |
71 | * nothing. | |
72 | */ | |
73 | public static void processUIEvents() { | |
74 | Display display = Display.getCurrent(); | |
75 | if (display != null && !display.isDisposed()) { | |
76 | while (display.readAndDispatch()) { | |
77 | // Keep pumping events until the queue is empty | |
78 | } | |
79 | } | |
80 | } | |
81 | ||
82 | /** | |
83 | * Process all queued UI events. If called from background thread, just | |
84 | * waits | |
85 | * | |
86 | * @param millis max wait time to process events | |
87 | */ | |
88 | public static void processUIEvents(final long millis) throws Exception { | |
89 | long start = System.currentTimeMillis(); | |
90 | while (System.currentTimeMillis() - start < millis) { | |
91 | Display display = Display.getCurrent(); | |
92 | if (display != null && !display.isDisposed()) { | |
93 | while (display.readAndDispatch()) { | |
94 | // loop until the queue is empty | |
95 | } | |
96 | } else { | |
97 | Thread.sleep(10); | |
98 | } | |
99 | } | |
100 | } | |
101 | ||
102 | /** | |
103 | * Waits while given condition is {@code true} for a given amount of | |
104 | * milliseconds. If the actual wait time exceeds given timeout and condition | |
105 | * will be still {@code true}, throws {@link AssertionFailedError} with | |
106 | * given message. | |
107 | * <p> | |
108 | * Will process UI events while waiting in UI thread, if called from | |
109 | * background thread, just waits. | |
110 | * | |
111 | * @param <T> type of the context | |
112 | * @param condition function which will be evaluated while waiting | |
113 | * @param context test context | |
114 | * @param timeout max wait time in milliseconds to wait on given condition | |
115 | * @param errorMessage message which will be used to construct the failure | |
116 | * exception in case the condition will still return {@code true} | |
117 | * after given timeout | |
118 | */ | |
119 | public static <T> void waitWhile(Function<T, Boolean> condition, T context, long timeout, Function<T, String> errorMessage) throws Exception { | |
120 | long start = System.currentTimeMillis(); | |
121 | Display display = Display.getCurrent(); | |
122 | while (System.currentTimeMillis() - start < timeout && condition.apply(context)) { | |
123 | if (display != null && !display.isDisposed()) { | |
124 | if (!display.readAndDispatch()) { | |
125 | Thread.sleep(0); | |
126 | } | |
127 | } else { | |
128 | Thread.sleep(5); | |
129 | } | |
130 | } | |
131 | Boolean stillTrue = condition.apply(context); | |
132 | if (stillTrue) { | |
133 | fail(errorMessage.apply(context)); | |
134 | } | |
135 | } | |
136 | ||
137 | /** | |
138 | * A simplified variant of | |
139 | * {@link #waitWhile(Function, Object, long, Function)}. | |
140 | * <p> | |
141 | * Waits while given condition is {@code true} for a given amount of | |
142 | * milliseconds. | |
143 | * <p> | |
144 | * Will process UI events while waiting in UI thread, if called from | |
145 | * background thread, just waits. | |
146 | * | |
147 | * @param condition function which will be evaluated while waiting | |
148 | * @param timeout max wait time in milliseconds to wait on given condition | |
149 | * @return value of condition when method returned | |
150 | */ | |
151 | public static boolean waitWhile(Supplier<Boolean> condition, long timeout) throws Exception { | |
152 | if (condition == null) { | |
153 | condition = () -> true; | |
154 | } | |
155 | long start = System.currentTimeMillis(); | |
156 | Display display = Display.getCurrent(); | |
157 | while (System.currentTimeMillis() - start < timeout && condition.get()) { | |
158 | Thread.yield(); | |
159 | if (display != null && !display.isDisposed()) { | |
160 | if (!display.readAndDispatch()) { | |
161 | Thread.sleep(1); | |
162 | } | |
163 | } else { | |
164 | Thread.sleep(5); | |
165 | } | |
166 | } | |
167 | return condition.get(); | |
168 | } | |
169 | ||
170 | /** | |
171 | * Utility for waiting until the execution of jobs of any family has | |
172 | * finished or timeout is reached. If no jobs are running, the method waits | |
173 | * given minimum wait time. While this method is waiting for jobs, UI events | |
174 | * are processed. | |
175 | * | |
176 | * @param owner name of the caller which will be logged as prefix if the | |
177 | * wait times out | |
178 | * @param minTimeMs minimum wait time in milliseconds | |
179 | * @param maxTimeMs maximum wait time in milliseconds | |
180 | * @return true if the method timed out, false if all the jobs terminated | |
181 | * before the timeout | |
182 | */ | |
183 | public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs) { | |
184 | return waitForJobs(owner, minTimeMs, maxTimeMs, (Object[]) null); | |
185 | } | |
186 | ||
187 | /** | |
188 | * Utility for waiting until the execution of jobs of any family has finished or timeout is reached. If no jobs are running, the method waits | |
189 | * given minimum wait time. While this method is waiting for jobs, UI events are processed. | |
190 | * | |
191 | * @param owner | |
192 | * name of the caller which will be logged as prefix if the wait times out | |
193 | * @param minTimeMs | |
194 | * minimum wait time in milliseconds | |
195 | * @param maxTimeMs | |
196 | * maximum wait time in milliseconds | |
197 | * @param excludedFamilies | |
198 | * optional list of job families to NOT wait for | |
199 | * | |
200 | * @return true if the method timed out, false if all the jobs terminated before the timeout | |
201 | */ | |
202 | public static boolean waitForJobs(String owner, long minTimeMs, long maxTimeMs, Object... excludedFamilies) { | |
203 | if (maxTimeMs < minTimeMs) { | |
204 | throw new IllegalArgumentException("Max time is smaller as min time!"); | |
205 | } | |
206 | final long start = System.currentTimeMillis(); | |
207 | while (System.currentTimeMillis() - start < minTimeMs) { | |
208 | processUIEvents(); | |
209 | try { | |
210 | Thread.sleep(Math.min(10, minTimeMs)); | |
211 | } catch (InterruptedException e) { | |
212 | // Uninterruptable | |
213 | } | |
214 | } | |
215 | while (!Job.getJobManager().isIdle()) { | |
216 | List<Job> jobs = getRunningOrWaitingJobs(null, excludedFamilies); | |
217 | if (jobs.isEmpty()) { | |
218 | // only uninteresting jobs running | |
219 | break; | |
220 | } | |
221 | ||
222 | if (!Collections.disjoint(runningJobs, jobs)) { | |
223 | // There is a job which runs already quite some time, don't wait for it to avoid test timeouts | |
224 | dumpRunningOrWaitingJobs(owner, jobs); | |
225 | return true; | |
226 | } | |
227 | ||
228 | if (System.currentTimeMillis() - start >= maxTimeMs) { | |
229 | dumpRunningOrWaitingJobs(owner, jobs); | |
230 | return true; | |
231 | } | |
232 | processUIEvents(); | |
233 | try { | |
234 | Thread.sleep(10); | |
235 | } catch (InterruptedException e) { | |
236 | // Uninterruptable | |
237 | } | |
238 | } | |
239 | runningJobs.clear(); | |
240 | return false; | |
241 | } | |
242 | ||
243 | static Set<Job> runningJobs = new LinkedHashSet<>(); | |
244 | ||
245 | private static void dumpRunningOrWaitingJobs(String owner, List<Job> jobs) { | |
246 | String message = "Some job is still running or waiting to run: " + dumpRunningOrWaitingJobs(jobs); | |
247 | log(IStatus.ERROR, owner, message); | |
248 | } | |
249 | ||
250 | private static String dumpRunningOrWaitingJobs(List<Job> jobs) { | |
251 | if (jobs.isEmpty()) { | |
252 | return ""; | |
253 | } | |
254 | // clear "old" running jobs, we only remember most recent | |
255 | runningJobs.clear(); | |
256 | StringBuilder sb = new StringBuilder(); | |
257 | for (Job job : jobs) { | |
258 | runningJobs.add(job); | |
259 | sb.append("\n'").append(job.toString()).append("'/"); | |
260 | sb.append(job.getClass().getName()); | |
261 | Thread thread = job.getThread(); | |
262 | if (thread != null) { | |
263 | ThreadInfo[] threadInfos = ManagementFactory.getThreadMXBean().getThreadInfo(new long[] { thread.getId() }, true, true); | |
264 | if (threadInfos[0] != null) { | |
265 | sb.append("\nthread info: ").append(threadInfos[0]); | |
266 | } | |
267 | } | |
268 | sb.append(", "); | |
269 | } | |
270 | sb.setLength(sb.length() - 2); | |
271 | return sb.toString(); | |
272 | } | |
273 | ||
274 | public static List<Job> getRunningOrWaitingJobs(Object jobFamily, Object... excludedFamilies) { | |
275 | List<Job> running = new ArrayList<>(); | |
276 | Job[] jobs = Job.getJobManager().find(jobFamily); | |
277 | for (Job job : jobs) { | |
278 | if (isRunningOrWaitingJob(job) && !belongsToFamilies(job, excludedFamilies)) { | |
279 | running.add(job); | |
280 | } | |
281 | } | |
282 | return running; | |
283 | } | |
284 | ||
285 | private static boolean isRunningOrWaitingJob(Job job) { | |
286 | int state = job.getState(); | |
287 | return (state == Job.RUNNING || state == Job.WAITING); | |
288 | } | |
289 | ||
290 | private static boolean belongsToFamilies(Job job, Object... excludedFamilies) { | |
291 | if (excludedFamilies == null || excludedFamilies.length == 0) { | |
292 | return false; | |
293 | } | |
294 | for (Object family : excludedFamilies) { | |
295 | if (job.belongsTo(family)) { | |
296 | return true; | |
297 | } | |
298 | } | |
299 | return false; | |
300 | } | |
301 | ||
302 | } |
+110
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2009, 2013 Wind River Systems and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * Wind River Systems - initial API and implementation | |
12 | * IBM - ongoing enhancements | |
13 | *******************************************************************************/ | |
14 | package org.eclipse.debug.ui.launchview.tests; | |
15 | ||
16 | import java.io.File; | |
17 | import java.io.IOException; | |
18 | import java.net.URL; | |
19 | ||
20 | import org.eclipse.core.resources.IProject; | |
21 | import org.eclipse.core.resources.IResource; | |
22 | import org.eclipse.core.resources.IWorkspaceRoot; | |
23 | import org.eclipse.core.resources.ResourcesPlugin; | |
24 | import org.eclipse.core.runtime.CoreException; | |
25 | import org.eclipse.core.runtime.FileLocator; | |
26 | import org.eclipse.core.runtime.IPath; | |
27 | import org.eclipse.ui.plugin.AbstractUIPlugin; | |
28 | import org.osgi.framework.Bundle; | |
29 | import org.osgi.framework.BundleContext; | |
30 | ||
31 | /** | |
32 | * The activator class controls the plug-in life cycle | |
33 | * | |
34 | * @since 1.0 | |
35 | */ | |
36 | public class TestsPlugin extends AbstractUIPlugin { | |
37 | ||
38 | // The plug-in ID | |
39 | public static final String PLUGIN_ID = "org.eclipse.debug.ui.launchview.tests"; //$NON-NLS-1$ | |
40 | ||
41 | // The shared instance | |
42 | private static TestsPlugin plugin; | |
43 | ||
44 | /** | |
45 | * The constructor | |
46 | */ | |
47 | public TestsPlugin() { | |
48 | } | |
49 | ||
50 | @Override | |
51 | public void start(BundleContext context) throws Exception { | |
52 | super.start(context); | |
53 | plugin = this; | |
54 | } | |
55 | ||
56 | @Override | |
57 | public void stop(BundleContext context) throws Exception { | |
58 | plugin = null; | |
59 | super.stop(context); | |
60 | } | |
61 | ||
62 | /** | |
63 | * Returns the shared instance | |
64 | * | |
65 | * @return the shared instance | |
66 | */ | |
67 | public static TestsPlugin getDefault() { | |
68 | return plugin; | |
69 | } | |
70 | ||
71 | /** | |
72 | * Returns the file corresponding to the specified path from within this bundle | |
73 | * @param path | |
74 | * @return the file corresponding to the specified path from within this bundle, or | |
75 | * <code>null</code> if not found | |
76 | */ | |
77 | public File getFileInPlugin(IPath path) { | |
78 | try { | |
79 | Bundle bundle = getDefault().getBundle(); | |
80 | URL installURL = new URL(bundle.getEntry("/"), path.toString()); //$NON-NLS-1$ | |
81 | URL localURL= FileLocator.toFileURL(installURL);//Platform.asLocalURL(installURL); | |
82 | return new File(localURL.getFile()); | |
83 | } catch (IOException e) { | |
84 | return null; | |
85 | } | |
86 | } | |
87 | ||
88 | /** | |
89 | * Creates a new project with the specified name | |
90 | * @param projectName | |
91 | * @return a new project with the specified name | |
92 | * @throws CoreException | |
93 | */ | |
94 | public static IProject createProject(String projectName) throws CoreException { | |
95 | IWorkspaceRoot root= ResourcesPlugin.getWorkspace().getRoot(); | |
96 | IProject project= root.getProject(projectName); | |
97 | if (!project.exists()) { | |
98 | project.create(null); | |
99 | } else { | |
100 | project.refreshLocal(IResource.DEPTH_INFINITE, null); | |
101 | } | |
102 | ||
103 | if (!project.isOpen()) { | |
104 | project.open(null); | |
105 | } | |
106 | return project; | |
107 | } | |
108 | ||
109 | } |
+38
-0
0 | /******************************************************************************* | |
1 | * Copyright (c) 2021 SSI Schaefer IT Solutions GmbH and others. | |
2 | * | |
3 | * This program and the accompanying materials | |
4 | * are made available under the terms of the Eclipse Public License 2.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * https://www.eclipse.org/legal/epl-2.0/ | |
7 | * | |
8 | * SPDX-License-Identifier: EPL-2.0 | |
9 | * | |
10 | * Contributors: | |
11 | * SSI Schaefer IT Solutions GmbH | |
12 | *******************************************************************************/ | |
13 | package org.eclipse.debug.ui.launchview.tests.launchview; | |
14 | ||
15 | import static org.junit.Assert.assertNotNull; | |
16 | ||
17 | import org.eclipse.debug.ui.launchview.tests.AbstractLaunchViewTest; | |
18 | import org.eclipse.ui.IWorkbenchPage; | |
19 | import org.eclipse.ui.PartInitException; | |
20 | import org.eclipse.ui.PlatformUI; | |
21 | import org.junit.Test; | |
22 | ||
23 | public class LaunchViewSmokeTest extends AbstractLaunchViewTest { | |
24 | ||
25 | @Test | |
26 | public void testOpenView() { | |
27 | IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); | |
28 | assertNotNull("The active workbench page should not be null", page); //$NON-NLS-1$ | |
29 | try { | |
30 | page.showView("org.eclipse.debug.ui.launchView"); //$NON-NLS-1$ | |
31 | } catch (PartInitException e) { | |
32 | assertNotNull("Failed to open launch configuration view", null); //$NON-NLS-1$ | |
33 | } | |
34 | ||
35 | } | |
36 | ||
37 | } |
0 | <?xml version="1.0" encoding="UTF-8"?> | |
1 | <!-- | |
2 | Copyright (c) 2009, 2011 IBM Corporation and others. | |
3 | ||
4 | This program and the accompanying materials | |
5 | are made available under the terms of the Eclipse Public License 2.0 | |
6 | which accompanies this distribution, and is available at | |
7 | https://www.eclipse.org/legal/epl-2.0/ | |
8 | ||
9 | SPDX-License-Identifier: EPL-2.0 | |
10 | ||
11 | Contributors: | |
12 | IBM Corporation - initial API and implementation | |
13 | --> | |
14 | ||
15 | <project name="testsuite" default="run" basedir="."> | |
16 | <!-- The property ${eclipse-home} should be passed into this script --> | |
17 | <!-- Set a meaningful default value for when it is not. --> | |
18 | <property name="eclipse-home" value="${basedir}\..\.."/> | |
19 | ||
20 | <!-- sets the properties eclipse-home, and library-file --> | |
21 | <property name="plugin-name" value="org.eclipse.debug.ui.launchview.tests"/> | |
22 | <property name="library-file" | |
23 | value="${eclipse-home}/plugins/org.eclipse.test/library.xml"/> | |
24 | ||
25 | <!-- This target holds all initialization code that needs to be done for --> | |
26 | <!-- all tests that are to be run. Initialization for individual tests --> | |
27 | <!-- should be done within the body of the suite target. --> | |
28 | <target name="init"> | |
29 | <tstamp/> | |
30 | <delete> | |
31 | <fileset dir="${eclipse-home}" includes="org*.xml"/> | |
32 | </delete> | |
33 | </target> | |
34 | ||
35 | <!-- This target defines the regression tests that need to be run. --> | |
36 | <target name="suite"> | |
37 | <property name="platform-debug-folder" | |
38 | value="${eclipse-home}/platform_debug_folder"/> | |
39 | <delete dir="${platform-debug-folder}" quiet="true"/> | |
40 | <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}"> | |
41 | <property name="data-dir" value="${platform-debug-folder}"/> | |
42 | <property name="plugin-name" value="${plugin-name}"/> | |
43 | <property name="classname" | |
44 | value="org.eclipse.debug.ui.launchview.tests.AutomatedSuite"/> | |
45 | </ant> | |
46 | </target> | |
47 | ||
48 | <!-- This target holds code to cleanup the testing environment after --> | |
49 | <!-- after all of the tests have been run. You can use this target to --> | |
50 | <!-- delete temporary files that have been created. --> | |
51 | <target name="cleanup"> | |
52 | </target> | |
53 | ||
54 | <!-- This target runs the test suite. Any actions that need to happen --> | |
55 | <!-- after all the tests have been run should go here. --> | |
56 | <target name="run" depends="init,suite,cleanup"> | |
57 | <ant target="collect" antfile="${library-file}" dir="${eclipse-home}"> | |
58 | <property name="includes" value="org*.xml"/> | |
59 | <property name="output-file" value="${plugin-name}.xml"/> | |
60 | </ant> | |
61 | </target> | |
62 | ||
63 | </project> |
14 | 14 | <parent> |
15 | 15 | <artifactId>eclipse.platform.debug</artifactId> |
16 | 16 | <groupId>eclipse.platform.debug</groupId> |
17 | <version>4.21.0-SNAPSHOT</version> | |
17 | <version>4.22.0-SNAPSHOT</version> | |
18 | 18 | </parent> |
19 | 19 | <groupId>org.eclipse.debug</groupId> |
20 | 20 | <artifactId>org.eclipse.unittest.ui</artifactId> |
14 | 14 | <parent> |
15 | 15 | <groupId>org.eclipse</groupId> |
16 | 16 | <artifactId>eclipse-platform-parent</artifactId> |
17 | <version>4.21.0-SNAPSHOT</version> | |
17 | <version>4.22.0-SNAPSHOT</version> | |
18 | 18 | <relativePath>../eclipse-platform-parent</relativePath> |
19 | 19 | </parent> |
20 | 20 | |
59 | 59 | <module>org.eclipse.debug.examples.ui</module> |
60 | 60 | <module>org.eclipse.debug.tests</module> |
61 | 61 | <module>org.eclipse.debug.ui</module> |
62 | <module>org.eclipse.debug.ui.launchview</module> | |
63 | <module>org.eclipse.debug.ui.launchview.tests</module> | |
62 | 64 | <module>org.eclipse.ui.console</module> |
63 | 65 | <module>org.eclipse.ui.externaltools</module> |
64 | 66 | <module>org.eclipse.unittest.ui</module> |