Eclipse warns if a String literal does not have a `//$NON-NLS-<n>$`
entry at the end of the line. However, for historic or formatting
reasons, many such occurrences in the CDT source have an intermediate
whitespace, such as `// $NON-NLS-<n>$`
Fix these so that the whitespace is removed between the // and $
characters.
Change-Id: Idc12398fe6e9d619af1d0b1b73fb8b6180da223c
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
When using a `StringBuilder` or `StringBuffer` to create a string message,
using implicit string concatenation inside an `.append()` call will
create a nested StringBuilder for the purposes of creating the arguments,
which will subsequently be converted to a String and then passed to
the outer StringBuilder.
Skip the creation of the intermediate object and String by simply
replacing such calls with `buffer.append(a).append(b)`.
Where values are compile time String constants, leave as is so
that the javac compiler can perform compile-time String concatenation.
Ensure that NEWLINE isn't appended in such a way since it is not
a compile time constant `System.getProperty("line.separator")`
Change-Id: I4126aefb2272f06b08332e004d7ea76b6f02cdba
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
There are many opportunities for replacing `StringBuffer` with
`StringBuilder` provided that the type isn't visible from the
public API and is used only in internal methods. Replace these
where appropriate.
Change-Id: Ic2f50c5b6f3c3a4eae301bb3b40fb6faed235f79
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
- drop-down doesn't cause Apply button to activate when
changing Connections from previous connection
- fix setting of default connectionName to avoid NPE
- move setting of connectionURI when user changes drop-down
- add check in isvalid() to verify image exists in connection
- reload images when changing connection and ignore parent images
Change-Id: I9dbc8828a6e6321e9cd1392d4e8c4dbdf2a954db
In many cases a String's empty status is tested with `.equals("")`.
However, Java 1.6 added `.isEmpty()` which can be more efficient since
it compares the internal length parameter only for testing. Replace
code using the `.isEmpty()` variant instead.
Some tests for `"".equals(expr)` can be replaced with `expr.isEmpty()`
where it is already known that the `expr` is not null; however,
these have to be reviewed on a case-by-case basis.
Change-Id: I3c6af4d8b7638e757435914ac76cb3a67899a5fd
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Occurrences of `new String()` have been replaced with the equivalent `""` and
additional NON-NLS tags have been inserted in where appropriate.
Change-Id: I54cf71dcd0d5a92a675a71166d66949533de502b
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Using `new Integer` and other wrapper types such as `new Character` results in
potential extra heap utilisation as the values are not cached. The built-in
`Integer.valueOf` will perform caching on numbers in the range -128..127 (at
least) using a flyweight pattern. In addition, parsing `int` values can be done
with `Integer.parseInt` which avoids object construction.
Adjust tests such as `"true".equals(expr)` to `Boolean.parseBoolean(expr)`.
Change-Id: I0408a5c69afc4ca6ede71acaf6cc4abd67538006
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
The launch delegate id "org.eclipse.cdt.cdi.launch.localCLaunch" was
being used for both the Run launch and the CDI debug launch. To keep
supporting the CDI debug launch, we still had to keep that delegate
pointing to the class LocalCDILaunchDelegate.
Now that we have remove the CDI debug launch, we no longer need to keep
pointing to LocalCDILaunchDelegate, and can use the
"org.eclipse.cdt.cdi.launch.localCLaunch" on for Run and pointing to
LocalRunLaunchDelegate.
Some more details can be found in Bug 464636.
Change-Id: I36c2adc043d29a5a11121059470505c6526c068b
This is the first change to remove CDI from CDT. The CDI model
implementation is removed along with everything that directly
depends upon the implementation.
This commit does not include refactoring or moving classes. The few
insertions are the minimum necessary.
Change-Id: I80274e1a0d77bc7bb00a2afe4babc00c4f7613ae
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
- group launch would not appear in launch history as last item when
launched, so if you try to repeat last lunch you only get the last child
of the group launch. Fixing launch history by re-adding group launch at
the end
Change-Id: Iadf08c0639dcae63255c28d8cd08ccce23ffd660
- initialization of some parts were in weird places, which won't allow
properly overload it. Move build config initialization into
updateBuildOptionFromConfig from updateProjectFromConfig
Change-Id: I7eebe24da963b14de4eec48df27817a9820977fd
This code is not used and hasn't been touched since 2012.
Now it can be referred as the "old new new wizard".
Change-Id: Iccc60651a8233a5ef5b138dfcc334cfcf926d109
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
- an init() call from the Docker Launch plugin start() method may
not be able to get a Workbench Window so add code to ensure that
an NPE does not occur in ConnectionListener
- fix the ContainerLaunchConfigurationDelegate to return null for
the ipaddress() of the gdbserver run job if the info has not
yet been set (thread timing)
Change-Id: I6dae9f1997d8b5b7db3246c0feb7966c4795b05b
(cherry picked from commit bd7fad5f67)
- docker_small.gif was missing for SWTImagesFactory
- replace with container icon: repository-middle.gif for container Tab
Change-Id: Id18423f3bcad10142b8a3e834237f1b3bf49e7d6
Task-Url:
- Change to use the launcher plugin instead of the internal
Activator from org.eclipse.linuxtools.docker.ui
Change-Id: I55c5ee8a70714a76543b6deb029003c9d8a7862c
(cherry picked from commit e51f7256e5)
- creating a Container launch configuration in Debug Launch
Configurations View does not work
- problem is that the ContainerTab was not setting the connectionUri
by default
- also set Remote Attribute which is needed for Container launch
to properly connect with gdbserver in Docker Container
Change-Id: Ifb25b1cfcc8d4e3ac2c67b60a0072463774b108f
- use the new docker tooling plug-ins to launch and debug
CDT C/C++ applications in docker containers
Change-Id: I30689255a3443ce6d49f937f5e2506d86452915b
This could happen if a project was selected before creating the launch
and the project was missing a project description. For example, if the
.cproject was missing.
Change-Id: I3ecea6c4ee3cd3939c07ade361b2180fd86e6949
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
getAdaptable() in 4.5 M6 has changed to use generics, making casting its
result no longer necessary.
Change-Id: Idd943216a925576bb72c784b2c5a2a4b8e8b00d2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
updateBuildConfigCombo originally accepted null as arument, restored
this behavior (it is not called with null from cdt code, but may be
called from overriding classes)
Change-Id: I7d0f271b2bd414d380a1804b838ce38fbdc7c0af
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
as discussed on cdt-dev I am trying to make ui look better
and more generic by replacing
"Select configuration using 'C/C++ Application'"
checkbox with Automatic selector.
Launch delegate or subclass on main page can control and override
behaivior of this ui control
This won't break API but it will break UI if subclasses were actually
doing something with original chechbox control
(besides not creating it).
Change-Id: I36f20bf05ff19e1fd66782e2351f18edc7d507cc
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/39619
Tested-by: Hudson CI
It is now located in the cdt/org.eclipse.launchbar repo. The intention
is to move it to a project lower down the stack so it can be reused
accross Eclipse.
Change-Id: I9d623fa372fcf6e345ba68a8830db190a75e0d28
Reviewed-on: https://git.eclipse.org/r/38266
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
This code is required if any LaunchTab interacts with other tabs in LC
Change-Id: I5d5e3b6d4e51b1f3ee0ac6297ebb4d88ad220224
Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com>
Reviewed-on: https://git.eclipse.org/r/36955
Tested-by: Hudson CI
We've seen a deadlock during startup mainly caused by CDT but triggered
when the launch bar manager initialized. This moves the init to a job
where it should be anyway to ensure smooth startup.
Change-Id: Id4b63e07dca3f96c561d6b4f45d60cf7cbcf530c
Reviewed-on: https://git.eclipse.org/r/35235
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>