Class EclipseJavaFormatterSettings
java.lang.Object
de.funfried.netbeans.plugins.external.formatter.java.eclipse.EclipseJavaFormatterSettings
Utility class for Eclipse specific settings.
- Author:
- bahlef
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty key which defines the active profile of the Eclipse configuration file.static final StringProperty key which defines the location of the Eclipse formatter configuration file.static final StringProperty key which defines the line feed setting for the Eclipse formatter.static final StringConstant value of the Eclipse project specific formatter configuration file name.static final StringProperty key which defines the source level setting for the Eclipse formatter.static final StringProperty key which defines whether or not to use Eclipse project specific formatter configuration if available. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetEclipseFormatterFile(Preferences preferences, Document document) Returns the Eclipse formatter file for the givenDocumentfrom the givenPreferences.static booleanisProjectSetting(String filename) Returnstrueif the givenfilenameends withorg.eclipse.jdt.core.prefs.static booleanisWorkspaceMechanicFile(String filename) Returnstrueif the givenfilenameends with the workspace mechanic file extension epf.static booleanisXMLConfigurationFile(String filename) Returnstrueif the givenfilenameends with the XML file extension.
-
Field Details
-
ACTIVE_PROFILE
Property key which defines the active profile of the Eclipse configuration file.- See Also:
-
CONFIG_FILE_LOCATION
Property key which defines the location of the Eclipse formatter configuration file.- See Also:
-
USE_PROJECT_PREFS
Property key which defines whether or not to use Eclipse project specific formatter configuration if available.- Since:
- 1.10
- See Also:
-
PROJECT_PREF_FILE
Constant value of the Eclipse project specific formatter configuration file name.- Since:
- 1.10
- See Also:
-
LINEFEED
Property key which defines the line feed setting for the Eclipse formatter.- Since:
- 1.10
- See Also:
-
SOURCELEVEL
Property key which defines the source level setting for the Eclipse formatter.- Since:
- 1.10
- See Also:
-
-
Method Details
-
getEclipseFormatterFile
Returns the Eclipse formatter file for the givenDocumentfrom the givenPreferences. IfUSE_PROJECT_PREFSistruein the givenPreferences, it will be automatically checked if there is a project specific formatter configuration file available.- Parameters:
preferences- thePreferenceswhere to load fromdocument- theDocument- Returns:
- the Eclipse formatter file for the given
Documentfrom the givenPreferences. IfUSE_PROJECT_PREFSistruein the givenPreferences, it will be automatically checked if there is a project specific formatter configuration file available
-
isWorkspaceMechanicFile
Returnstrueif the givenfilenameends with the workspace mechanic file extension epf.- Parameters:
filename- the filename to check- Returns:
trueif the givenfilenameends with the workspace mechanic file extension epf, otherwisefalse
-
isXMLConfigurationFile
Returnstrueif the givenfilenameends with the XML file extension.- Parameters:
filename- the filename to check- Returns:
trueif the givenfilenameends with the XML file extension, otherwisefalse
-
isProjectSetting
Returnstrueif the givenfilenameends withorg.eclipse.jdt.core.prefs.- Parameters:
filename- the filename to check- Returns:
trueif the givenfilenameends withorg.eclipse.jdt.core.prefs, otherwisefalse
-