public class ClassBuilderModel extends AbstractBuilderModel implements AbstractPicker.PickerValueEncoder
Modifier and Type | Class and Description |
---|---|
static class |
ClassBuilderModel.DuplicateClassException |
static class |
ClassBuilderModel.IllegalBaseClassException |
static class |
ClassBuilderModel.IllegalClassNameException |
static class |
ClassBuilderModel.IllegalPackageNameException |
static class |
ClassBuilderModel.InvalidFileException |
static class |
ClassBuilderModel.UserCancelledFileException |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_BASE_CLASS |
static java.lang.String |
JAVA_EXTENSION_ID
Java Extension identifier.
|
static java.lang.String |
MODEL |
Constructor and Description |
---|
ClassBuilderModel(Context ctx) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_isClassAccessible(JavaClass cls,
java.lang.String pkg) |
protected boolean |
buildFile(Node node) |
protected SourceModel |
createSourceModel() |
java.lang.Object |
encodeValue(java.lang.Object value)
Encode a value into an object suitable for adding to the AbstractPicker
model.
|
protected void |
generate(SourceFile file,
SourceClass cls) |
void |
generateDefaultFileName() |
protected java.lang.String |
getBaseName() |
oracle.bali.ewt.dialog.JEWTDialog |
getBuilderDialog() |
java.lang.String |
getBuilderType() |
java.lang.String |
getClassName() |
boolean |
getConfirmOverwrite() |
Context |
getContext() |
protected java.lang.String |
getDefaultBaseClass() |
protected java.lang.String[] |
getDefaultBaseClasses() |
protected java.lang.String |
getDefaultRelativeDirectory(Project project) |
java.lang.Object |
getDefaultType() |
protected JavaManager |
getJavaManager() |
boolean |
getKeepDefaultPackage() |
protected java.lang.String[] |
getLibraries()
Deprecated.
No replacement.
|
javax.swing.MutableComboBoxModel |
getModel() |
boolean |
getOpenInEditor() |
protected java.lang.String[] |
getOtherImports() |
java.lang.String |
getPackage() |
java.awt.Component |
getPanel() |
java.lang.String |
getQualifiedClassName() |
boolean |
hasAttributes() |
protected boolean |
hasDefaultConstructor()
Whether classes created by this model should have a default
constructor created.
|
protected boolean |
isObjectBaseClass()
Whether the default base class is java.lang.Object
|
protected boolean |
isSuperclassEditable()
Indicates whether the user can directly edit text in the Extends
field.
|
protected void |
postProcess(Node node) |
void |
reportError(java.lang.String title,
java.lang.String msg,
java.lang.String helpID) |
void |
setActivePanel(java.awt.Component panel) |
void |
setBuilderDialog(oracle.bali.ewt.dialog.JEWTDialog dlg) |
void |
setClassName(java.lang.String newClassName) |
void |
setConfirmOverwrite(boolean confirmOverwrite)
Indicate whether to suppress the 'Confirm Overwrite' dialog.
|
void |
setKeepDefaultPackage(boolean keep) |
void |
setOpenInEditor(boolean openInEditor)
Indicate whether to open BeanInfo class in
its default editor after it is created.
|
void |
setPackage(java.lang.String newPackage) |
void |
updateGenerators() |
protected void |
updateStoredBaseClasses()
Adds any previously used classes to the model.
|
protected boolean |
validateClass(JavaClass cls,
java.lang.String pkg) |
protected void |
validateClassNameIsUnique()
This method is intended to allow subclasses to add their own
name validation.
|
protected boolean |
validateClassType(java.lang.String fqName,
java.lang.String pkgName) |
addFileToProject, commitWizardState, getDirectory, getFileContents, getFileName, getProject, getRelativeDirectory, getSourceModel, getURL, initializeFromContext, initializeSourceDir, isRaiseEditor, reportError, reportFailedToCreateNode, setClearExistingFiles, setDirectory, setFileName, setProject, setRaiseEditor, setRelativeDirectory, setURL, shouldAcquireTextBuffer, shouldAddToProjectContent
public static final java.lang.String MODEL
public static final java.lang.String JAVA_EXTENSION_ID
public static final java.lang.String DEFAULT_BASE_CLASS
public ClassBuilderModel(Context ctx)
protected java.lang.String getBaseName()
getBaseName
in class AbstractBuilderModel
protected final boolean buildFile(Node node)
buildFile
in class AbstractBuilderModel
protected SourceModel createSourceModel()
createSourceModel
in class AbstractBuilderModel
protected java.lang.String getDefaultRelativeDirectory(Project project)
getDefaultRelativeDirectory
in class AbstractBuilderModel
protected void validateClassNameIsUnique()
setClassName
.public final void setClassName(java.lang.String newClassName) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public final java.lang.String getClassName()
public final java.lang.String getQualifiedClassName()
public final void setPackage(java.lang.String newPackage) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public final java.lang.String getPackage()
public final void setKeepDefaultPackage(boolean keep)
public final boolean getKeepDefaultPackage()
public final void setOpenInEditor(boolean openInEditor)
public final boolean getOpenInEditor()
public final void setConfirmOverwrite(boolean confirmOverwrite)
public final boolean getConfirmOverwrite()
public final void generateDefaultFileName()
public final javax.swing.MutableComboBoxModel getModel()
public final java.lang.Object getDefaultType()
public final void setActivePanel(java.awt.Component panel)
public java.awt.Component getPanel()
public void setBuilderDialog(oracle.bali.ewt.dialog.JEWTDialog dlg)
public oracle.bali.ewt.dialog.JEWTDialog getBuilderDialog()
public final boolean hasAttributes()
public java.lang.String getBuilderType()
getBuilderType
in class AbstractBuilderModel
protected java.lang.String[] getDefaultBaseClasses()
protected java.lang.String getDefaultBaseClass()
protected java.lang.String[] getOtherImports()
@Deprecated protected java.lang.String[] getLibraries()
protected void updateStoredBaseClasses()
protected boolean validateClass(JavaClass cls, java.lang.String pkg)
protected final boolean _isClassAccessible(JavaClass cls, java.lang.String pkg)
protected boolean validateClassType(java.lang.String fqName, java.lang.String pkgName)
protected boolean hasDefaultConstructor()
protected boolean isObjectBaseClass()
protected boolean isSuperclassEditable()
protected void generate(SourceFile file, SourceClass cls)
protected final JavaManager getJavaManager()
public final Context getContext()
public final void reportError(java.lang.String title, java.lang.String msg, java.lang.String helpID)
reportError
in class AbstractBuilderModel
public void updateGenerators()
public java.lang.Object encodeValue(java.lang.Object value)
AbstractPicker.PickerValueEncoder
encodeValue
in interface AbstractPicker.PickerValueEncoder
value
- the raw value returned by a browse or edit.protected void postProcess(Node node)
postProcess
in class AbstractBuilderModel