Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse eTrice™
Eclipse eTrice
Commits
c81de2a4
Commit
c81de2a4
authored
May 06, 2022
by
Eyrak Paen-Rochlitz
Browse files
Expose the doc generator include_images option in the launcher config UI
Issue
#47
parent
77e63a11
Pipeline
#3937
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/org.eclipse.etrice.generator.launch.doc/src/org/eclipse/etrice/generator/launch/doc/DocGeneratorConfigTab.java
View file @
c81de2a4
...
...
@@ -14,11 +14,52 @@
package
org.eclipse.etrice.generator.launch.doc
;
import
org.eclipse.core.runtime.CoreException
;
import
org.eclipse.debug.core.ILaunchConfiguration
;
import
org.eclipse.debug.core.ILaunchConfigurationWorkingCopy
;
import
org.eclipse.etrice.generator.launch.GeneratorConfigTab
;
import
org.eclipse.etrice.generator.ui.preferences.PreferenceConstants
;
import
org.eclipse.swt.SWT
;
import
org.eclipse.swt.layout.GridData
;
import
org.eclipse.swt.widgets.Button
;
import
org.eclipse.swt.widgets.Composite
;
public
class
DocGeneratorConfigTab
extends
GeneratorConfigTab
{
public
static
final
String
INCLUDE_IMAGES
=
"includeImages"
;
private
Button
includeImages
;
@Override
protected
void
addFurtherControls
(
Composite
mainComposite
)
{
super
.
addFurtherControls
(
mainComposite
);
createSeparator
(
mainComposite
,
2
);
includeImages
=
createCheckButton
(
mainComposite
,
"include image links in document"
);
includeImages
.
setToolTipText
(
"this option generates image links for behavior and structure diagrams and the instance tree diagram"
);
includeImages
.
setLayoutData
(
new
GridData
(
SWT
.
BEGINNING
,
SWT
.
BEGINNING
,
false
,
false
,
2
,
1
));
includeImages
.
addSelectionListener
(
new
UpdateConfig
());
}
@Override
public
void
initializeFrom
(
ILaunchConfiguration
configuration
)
{
super
.
initializeFrom
(
configuration
);
try
{
includeImages
.
setSelection
(
configuration
.
getAttribute
(
INCLUDE_IMAGES
,
false
));
}
catch
(
CoreException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
performApply
(
ILaunchConfigurationWorkingCopy
configuration
)
{
super
.
performApply
(
configuration
);
configuration
.
setAttribute
(
INCLUDE_IMAGES
,
includeImages
.
getSelection
());
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
...
...
plugins/org.eclipse.etrice.generator.launch.doc/src/org/eclipse/etrice/generator/launch/doc/DocGeneratorLaunchConfigurationDelegate.java
View file @
c81de2a4
...
...
@@ -16,6 +16,11 @@ package org.eclipse.etrice.generator.launch.doc;
import
com.google.inject.Module
;
import
org.eclipse.core.resources.IProject
;
import
org.eclipse.core.runtime.CoreException
;
import
org.eclipse.debug.core.ILaunchConfiguration
;
import
org.eclipse.etrice.generator.base.args.Arguments
;
import
org.eclipse.etrice.generator.doc.setup.DocGeneratorOptions
;
import
org.eclipse.etrice.generator.doc.setup.GeneratorModule
;
import
org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate
;
import
org.eclipse.etrice.generator.ui.preferences.PreferenceConstants
;
...
...
@@ -28,6 +33,14 @@ public class DocGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConf
return
new
GeneratorModule
();
}
@Override
protected
void
configureArguments
(
Arguments
args
,
ILaunchConfiguration
configuration
,
IProject
project
)
throws
CoreException
{
super
.
configureArguments
(
args
,
configuration
,
project
);
boolean
includeImages
=
configuration
.
getAttribute
(
DocGeneratorConfigTab
.
INCLUDE_IMAGES
,
false
);
args
.
set
(
DocGeneratorOptions
.
INCLUDE_IMAGES
,
includeImages
);
}
/* (non-Javadoc)
* @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#getConsoleName()
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment