Skip to content

Commit

Permalink
avoid magic numbers
Browse files Browse the repository at this point in the history
Change-Id: I6c60a17faad4d30ee64032568dca155d8677cb7d
  • Loading branch information
LorenzoBettini committed Oct 21, 2016
1 parent d2c0ee8 commit bc7ed16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -32,6 +32,8 @@
*
*/
public class EmfParsleyDslProjectCreatorCustom extends EmfParsleyDslProjectCreator {
private static final int CREATING_PROJECT_WORK_STEPS = 5;

static EmfParsleyDslNewProjectFiles filesGenerator = new EmfParsleyDslNewProjectFiles();

static EmfParsleyProjectFilesGenerator projectFilesGenerator = new EmfParsleyProjectFilesGenerator();
Expand Down Expand Up @@ -107,7 +109,7 @@ protected void enhanceProject(final IProject project,

SubMonitor subMonitor = SubMonitor.convert(monitor,
"Creating project " + projectName,
5);
CREATING_PROJECT_WORK_STEPS);

String[] paths = { projectPackagePath };
NewEmfParsleyProjectSupport.addToProjectStructure(project, paths,
Expand Down
Expand Up @@ -77,6 +77,8 @@
*/
public abstract class AbstractControlFactory implements IWidgetFactory {

private static final int GRID_DATA_HORIZONTAL_INDENT = 10;

private static final String OBSERVE_PREFIX = "observe_";

private static final String CONTROL_PREFIX = "control_";
Expand Down Expand Up @@ -486,7 +488,7 @@ private void setupControl(EStructuralFeature f, Control c) {
// polymorphic implementation or from the DSL
if (c.getLayoutData()==null) {
GridData deafultLayout = new GridData(GridData.FILL_HORIZONTAL);
deafultLayout.horizontalIndent=10;
deafultLayout.horizontalIndent=GRID_DATA_HORIZONTAL_INDENT;
c.setLayoutData(deafultLayout);
}
}
Expand Down

0 comments on commit bc7ed16

Please sign in to comment.