Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Commit

Permalink
LANG: Minor followup changes.
Browse files Browse the repository at this point in the history
Conflicts:
	plugin_ide.ui/src/LANG_PROJECT_ID/ide/ui/preferences/LANGUAGE_Root__PreferencePage.java
  • Loading branch information
bruno-medeiros committed Oct 9, 2015
1 parent f2fc9ef commit a54dffe
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
Expand Up @@ -48,6 +48,7 @@
import melnorme.util.swt.SWTFactoryUtil; import melnorme.util.swt.SWTFactoryUtil;
import melnorme.util.swt.SWTUtil; import melnorme.util.swt.SWTUtil;
import melnorme.util.swt.components.AbstractComponent; import melnorme.util.swt.components.AbstractComponent;
import melnorme.util.swt.components.AbstractComponentExt;
import melnorme.util.swt.components.fields.DirectoryTextField; import melnorme.util.swt.components.fields.DirectoryTextField;
import melnorme.util.swt.components.fields.EnablementButtonTextField; import melnorme.util.swt.components.fields.EnablementButtonTextField;
import melnorme.util.swt.components.fields.TextFieldComponent; import melnorme.util.swt.components.fields.TextFieldComponent;
Expand Down Expand Up @@ -148,7 +149,7 @@ public void setVisible(boolean visible) {
} }
} }


public static class NameGroup extends AbstractComponent{ public static class NameGroup extends AbstractComponentExt {


protected TextFieldComponent textField = new TextFieldComponent(WizardMessages.LangNewProject_NameGroup_label); protected TextFieldComponent textField = new TextFieldComponent(WizardMessages.LangNewProject_NameGroup_label);


Expand Down Expand Up @@ -180,6 +181,11 @@ protected void createContents(Composite topControl) {
textField.createComponentInlined(topControl); textField.createComponentInlined(topControl);
} }


@Override
public void setEnabled(boolean enabled) {
textField.setEnabled(enabled);
}

@Override @Override
public void updateComponentFromInput() { public void updateComponentFromInput() {
} }
Expand Down Expand Up @@ -216,6 +222,12 @@ protected String getProjectName() {
return nameGroup.getName(); return nameGroup.getName();
} }


@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
nameGroup.setEnabled(enabled);
}

protected boolean isDefaultLocation() { protected boolean isDefaultLocation() {
return isUseDefault(); return isUseDefault();
} }
Expand Down
Expand Up @@ -30,14 +30,16 @@ public LangRootPreferencePage() {
} }


protected LangSDKConfigBlock createLangSDKConfigBlock() { protected LangSDKConfigBlock createLangSDKConfigBlock() {
LangSDKConfigBlock langSDKConfigBlock = new LangSDKConfigBlock(); LangSDKConfigBlock langSDKConfigBlock = doCreateLangSDKConfigBlock();


connectStringField(ToolchainPreferences.SDK_PATH.key, langSDKConfigBlock.getLocationField(), connectStringField(ToolchainPreferences.SDK_PATH.key, langSDKConfigBlock.getLocationField(),
getSDKValidator()); getSDKValidator());


return langSDKConfigBlock; return langSDKConfigBlock;
} }


protected abstract LangSDKConfigBlock doCreateLangSDKConfigBlock();

protected abstract PathValidator getSDKValidator(); protected abstract PathValidator getSDKValidator();


@Override @Override
Expand Down
Expand Up @@ -20,9 +20,9 @@
import melnorme.util.swt.components.fields.ButtonTextField; import melnorme.util.swt.components.fields.ButtonTextField;
import melnorme.util.swt.components.fields.DirectoryTextField; import melnorme.util.swt.components.fields.DirectoryTextField;


public class LangSDKConfigBlock extends AbstractComponent { public abstract class LangSDKConfigBlock extends AbstractComponent {


protected final LangSDKConfigBlock.LanguageSDKLocationGroup sdkLocationGroup = createSDKLocationGroup(); public final LangSDKConfigBlock.LanguageSDKLocationGroup sdkLocationGroup = createSDKLocationGroup();


public LangSDKConfigBlock() { public LangSDKConfigBlock() {
} }
Expand Down
Expand Up @@ -29,7 +29,7 @@ public AbstractComponentExt() {


/* ----------------- ----------------- */ /* ----------------- ----------------- */


public abstract void setEnabled(boolean readOnly); public abstract void setEnabled(boolean enabled);


protected void _verify_setEnabled() { protected void _verify_setEnabled() {
_verify_setEnabled(getClass()); _verify_setEnabled(getClass());
Expand Down

0 comments on commit a54dffe

Please sign in to comment.