--- a/ant.freeform/nbproject/project.xml +++ a/ant.freeform/nbproject/project.xml @@ -56,12 +56,12 @@ - org.netbeans.modules.options.editor + org.netbeans.modules.editor.indent.project - 1 - 1.18 + 0-1 + 1.0 --- a/ant.freeform/src/org/netbeans/modules/ant/freeform/resources/layer.xml +++ a/ant.freeform/src/org/netbeans/modules/ant/freeform/resources/layer.xml @@ -53,7 +53,7 @@ - + --- a/apisupport.project/nbproject/project.xml +++ a/apisupport.project/nbproject/project.xml @@ -208,12 +208,12 @@ - org.netbeans.modules.options.editor + org.netbeans.modules.editor.indent.project - 1 - 1.10 + 0-1 + 1.0 --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/resources/layer.xml +++ a/apisupport.project/src/org/netbeans/modules/apisupport/project/ui/resources/layer.xml @@ -320,7 +320,7 @@ - + --- a/editor.indent.project/apichanges.xml +++ a/editor.indent.project/apichanges.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + Editor Indentation for Projects + + + + + + + + + editor.indent.project module was created + + + + + + The module was created. + + + + + + + + + + + Change History of Editor Indentation for Projects API + + + + + + +

Introduction

+ +

This document lists changes made to the Editor Indentation for Projects API.

+ + +
+ + +

@FOOTER@

+ + +
+ +
--- a/editor.indent.project/arch.xml +++ a/editor.indent.project/arch.xml @@ -0,0 +1,1079 @@ + + +]> + + + + &api-questions; + + + + +

+ The provides + the formatting settings customizer for modules implementing various types of projects. +

+
+ + + + + +

+ The module's functionality can be tested by QA functional tests. +

+
+ + + + + +

+ There are no estimates. +

+
+ + + + + +

+ Modules can use o.n.m.editor.indent.project.Customizers.createFormattingCategoryProvider() + in their XML layer to add Formatting settings customizer to their project type's properties dialog. +

+
+ + + + + +

+ This project accomodates project-related editor stuff in order to keep the rest + of the editor infrastructure isolated from project APIs. +

+
+ + + + + + + + + + + + +

+ No influence. +

+
+ + + + + +

+ Yes. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ Yes. +

+
+ + + + + +

+ Any version required by current Netbeans version. +

+
+ + + + + +

+ JRE is enough. +

+
+ + + + + + + + + + + + +

+ None. +

+
+ + + + + +

+ It runs on all platforms withouth any difference. +

+
+ + + + + +

+ They have to declare a module dependency. +

+
+ + + + + +

+ Just the module JAR. +

+
+ + + + + +

+ Yes. +

+
+ + + + + +

+ Yes. +

+
+ + + + + +

+ This module can be installed anywhere. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ The API is threadsafe. Internally the code uses synchronized sections and ProjectManager.mutex(). +

+
+ + + + + +

+ None. +

+
+ + + + + +

+ None. +

+
+ + + + + +

+ None. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ The module registers implementation of CodeStylePreferences.Provider in the default Lookup. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No estimates. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No idea. +

+
+ + + + + +

+ No code can be plugged. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ + + + + +

+ No. +

+
+ +
--- a/editor.indent.project/build.xml +++ a/editor.indent.project/build.xml @@ -0,0 +1,5 @@ + + + Builds, tests, and runs the project org.netbeans.modules.editor.indent.project + + --- a/editor.indent.project/manifest.mf +++ a/editor.indent.project/manifest.mf @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +OpenIDE-Module: org.netbeans.modules.editor.indent.project/0 +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/indent/project/Bundle.properties +OpenIDE-Module-Provides: org.netbeans.modules.editor.indent.spi.CodeStylePreferences.Provider +OpenIDE-Module-Specification-Version: 1.0 + --- a/editor.indent.project/nbproject/project.properties +++ a/editor.indent.project/nbproject/project.properties @@ -0,0 +1,46 @@ +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. +# +# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved. +# +# The contents of this file are subject to the terms of either the GNU +# General Public License Version 2 only ("GPL") or the Common +# Development and Distribution License("CDDL") (collectively, the +# "License"). You may not use this file except in compliance with the +# License. You can obtain a copy of the License at +# http://www.netbeans.org/cddl-gplv2.html +# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the +# specific language governing permissions and limitations under the +# License. When distributing the software, include this License Header +# Notice in each file and include the License file at +# nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this +# particular file as subject to the "Classpath" exception as provided +# by Sun in the GPL Version 2 section of the License file that +# accompanied this code. If applicable, add the following below the +# License Header, with the fields enclosed by brackets [] replaced by +# your own identifying information: +# "Portions Copyrighted [year] [name of copyright owner]" +# +# Contributor(s): +# +# The Original Software is NetBeans. The Initial Developer of the Original +# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun +# Microsystems, Inc. All Rights Reserved. +# +# If you wish your version of this file to be governed by only the CDDL +# or only the GPL Version 2, indicate your decision by adding +# "[Contributor] elects to include this software in this distribution +# under the [CDDL or GPL Version 2] license." If you do not indicate a +# single choice of license, a recipient has the option to distribute +# your version of this file under either the CDDL, the GPL Version 2 or +# to extend the choice of license to its licensees as provided above. +# However, if you add GPL Version 2 code and therefore, elected the GPL +# Version 2 license, then the option applies only if the new code is +# made subject to such option by the copyright holder. + +is.eager=true +javac.source=1.6 +javac.compilerargs=-Xlint -Xlint:-serial + +javadoc.arch=${basedir}/arch.xml +javadoc.apichanges=${basedir}/apichanges.xml +javadoc.title=Editor Indentation for Projects --- a/editor.indent.project/nbproject/project.xml +++ a/editor.indent.project/nbproject/project.xml @@ -0,0 +1,165 @@ + + + org.netbeans.modules.apisupport.project + + + org.netbeans.modules.editor.indent.project + + + org.jdesktop.layout + + + + 1 + 1.12 + + + + org.netbeans.modules.editor.indent + + + + 2 + 1.17 + + + + org.netbeans.modules.editor.mimelookup + + + + 1 + 1.15 + + + + org.netbeans.modules.editor.settings + + + + 1 + 1.28 + + + + org.netbeans.modules.editor.settings.storage + + + + 1 + 1.24 + + + + org.netbeans.modules.options.api + + + + 1 + 1.17 + + + + org.netbeans.modules.options.editor + + + + 1 + 1.20 + + + + org.netbeans.modules.projectapi + + + + 1 + 1.29 + + + + org.netbeans.modules.projectuiapi + + + + 1 + 1.41 + + + + org.openide.awt + + + + 7.21 + + + + org.openide.dialogs + + + + 7.14 + + + + org.openide.filesystems + + + + 7.35 + + + + org.openide.loaders + + + + 7.12 + + + + org.openide.nodes + + + + 7.14 + + + + org.openide.util + + + + 8.1 + + + + org.openide.util.lookup + + + + 8.1 + + + + + + unit + + org.netbeans.libs.junit4 + + + + org.netbeans.modules.nbjunit + + + + + + + org.netbeans.modules.editor.indent.project.api + + + + --- a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/Bundle.properties +++ a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/Bundle.properties @@ -0,0 +1,28 @@ +OpenIDE-Module-Name=Editor Indentation for Projects + +#FormattingCustomizerPanel +LBL_CategoryFormatting=Formatting +LBL_FormattingCustomizer_Global=Use &global options +LBL_FormattingCustomizer_Project=Use &project specific options +LBL_FormattingCustomizer_EditGlobal=&Edit global options +LBL_ForamttingCustomizer_Load=Load from &other project + +# Messages in FormattingCustomizerPanel +MSG_CodeStyle_Import_Forbidden_From_The_Same_Project=Loading formatting settings from the same project is not allowed. +MSG_No_CodeStyle_Info_To_Import=The project you chose contains no formatting settings. +MSG_CodeStyle_Import_Successful=The formatting settings were successfully imported. +MSG_CodeStyle_Import_Failed=Importing the formatting settings failed. + +#FormattingCustomizerPanel +MSG_use_global_settings_confirmation=This will remove all formatting settings and their customizations from this project. Do you want to proceed? +MSG_use_global_settings_confirmation_title=Use global formatting settings +FormattingPanel.languageCombo.AccessibleContext.accessibleDescription=Language list. +FormattingPanel.languageCombo.AccessibleContext.accessibleName=Language +FormattingPanel.categoryCombo.AccessibleContext.accessibleDescription=Category list. +FormattingPanel.categoryCombo.AccessibleContext.accessibleName=Category +FormattingCustomizerPanel.editGlobalButton.AccessibleContext.accessibleDescription=Edit global options +FormattingCustomizerPanel.loadButton.AccessibleContext.accessibleDescription=Load from other project +FormattingCustomizerPanel.globalButton.AccessibleContext.accessibleDescription=Use global options +FormattingCustomizerPanel.projectButton.AccessibleContext.accessibleDescription=Use project specific options +AD_Language=Language +AD_Category=Category --- a/options.editor/src/org/netbeans/modules/options/indentation/FormattingCustomizerPanel.form +++ a/options.editor/src/org/netbeans/modules/options/indentation/FormattingCustomizerPanel.form @@ -5,9 +5,6 @@ - - - --- a/options.editor/src/org/netbeans/modules/options/indentation/FormattingCustomizerPanel.java +++ a/options.editor/src/org/netbeans/modules/options/indentation/FormattingCustomizerPanel.java @@ -39,7 +39,7 @@ * made subject to such option by the copyright holder. */ -package org.netbeans.modules.options.indentation; +package org.netbeans.modules.editor.indent.project; import java.awt.BorderLayout; import java.awt.Component; @@ -65,10 +65,15 @@ import org.netbeans.api.project.ProjectManager; import org.netbeans.api.project.ProjectUtils; import org.netbeans.modules.editor.indent.api.IndentUtils; +import org.netbeans.modules.editor.indent.project.api.Customizers; import org.netbeans.modules.editor.settings.storage.api.EditorSettings; import org.netbeans.modules.editor.settings.storage.api.EditorSettingsStorage; import org.netbeans.modules.editor.settings.storage.spi.TypedValue; import org.netbeans.modules.options.editor.spi.PreferencesCustomizer; +import org.netbeans.modules.options.indentation.CustomizerSelector; +import org.netbeans.modules.options.indentation.FormattingPanel; +import org.netbeans.modules.options.indentation.FormattingPanelController; +import org.netbeans.modules.options.indentation.ProxyPreferences; import org.netbeans.spi.project.ui.support.ProjectChooser; import org.netbeans.spi.project.ui.support.ProjectCustomizer; import org.openide.DialogDisplayer; @@ -104,10 +109,12 @@ * @param attrs The map of FileObject attributes * * @return A new 'Formatting' category provider. - * @since 1.10 + * @since 1.0 + * @deprecated Use {@link Customizers#createFormattingCategoryProvider(java.util.Map) } instead. */ + @Deprecated public static ProjectCustomizer.CompositeCategoryProvider createCategoryProvider(Map attrs) { - return new Factory((String)attrs.get("allowedMimeTypes")); //NOI18N + return Customizers.createFormattingCategoryProvider(attrs); } public static class Factory implements ProjectCustomizer.CompositeCategoryProvider { @@ -241,7 +248,7 @@ .add(loadButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .add(layout.createSequentialGroup() .add(12, 12, 12) - .add(customizerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 490, Short.MAX_VALUE)) + .add(customizerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) --- a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/ProjectAwareCodeStylePreferences.java +++ a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/ProjectAwareCodeStylePreferences.java @@ -0,0 +1,252 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2010 Sun Microsystems, Inc. + */ + +package org.netbeans.modules.editor.indent.project; + +import java.lang.ref.Reference; +import java.lang.ref.WeakReference; +import java.util.HashMap; +import java.util.Map; +import java.util.WeakHashMap; +import java.util.logging.Logger; +import java.util.prefs.AbstractPreferences; +import java.util.prefs.PreferenceChangeEvent; +import java.util.prefs.PreferenceChangeListener; +import java.util.prefs.Preferences; +import javax.swing.text.Document; +import org.netbeans.api.editor.mimelookup.MimeLookup; +import org.netbeans.api.editor.mimelookup.MimePath; +import org.netbeans.api.project.FileOwnerQuery; +import org.netbeans.api.project.Project; +import org.netbeans.api.project.ProjectManager; +import org.netbeans.api.project.ProjectUtils; +import org.netbeans.modules.editor.indent.api.IndentUtils; +import org.netbeans.modules.editor.indent.spi.CodeStylePreferences; +import org.openide.filesystems.FileObject; +import org.openide.loaders.DataObject; +import org.openide.util.Utilities; +import org.openide.util.WeakListeners; +import org.openide.util.lookup.ServiceProvider; + +/** + * + * @author vita + */ +@ServiceProvider(service=CodeStylePreferences.Provider.class) +public final class ProjectAwareCodeStylePreferences implements CodeStylePreferences.Provider { + + @Override + public Preferences forFile(FileObject file, String mimeType) { + return singleton.forFile(file, mimeType); + } + + @Override + public Preferences forDocument(Document doc, String mimeType) { + return singleton.forDocument(doc, mimeType); + } + + // ---------------------------------------------------------------------- + // private implementation + // ---------------------------------------------------------------------- + + private static final Logger LOG = Logger.getLogger(ProjectAwareCodeStylePreferences.class.getName()); + private static final CodeStylePreferences.Provider singleton = new CodeStylePreferences.Provider() { + + @Override + public Preferences forFile(FileObject file, String mimeType) { + return getCsp(file, mimeType).getPreferences(); + } + + @Override + public Preferences forDocument(Document doc, String mimeType) { + return getCsp(doc, mimeType).getPreferences(); + } + + // -------------------------------------------------------------------- + // private implementation + // -------------------------------------------------------------------- + + private final Map> cache = new WeakHashMap>(); + + private Csp getCsp(final Object obj, final String mimeType) { + synchronized (cache) { + Map csps = cache.get(obj); + Csp csp = csps != null ? csps.get(mimeType) : null; + if (csp == null) { + Document doc; + FileObject file; + + if (obj instanceof FileObject) { + doc = null; + file = (FileObject) obj; + } else { + doc = (Document) obj; + file = findFileObject(doc); + } + + csp = new Csp( + mimeType, + doc == null ? null : new CleaningWeakReference(doc), + file); + if (csps == null) { + csps = new HashMap(); + cache.put(obj, csps); + } + csps.put(mimeType, csp); + } + + return csp; + } + } + + final class CleaningWeakReference extends WeakReference implements Runnable { + + public CleaningWeakReference(Document referent) { + super(referent, Utilities.activeReferenceQueue()); + } + + public @Override void run() { + synchronized (cache) { + //expunge stale entries from the cache: + cache.size(); + } + } + + } + }; + + private static final class Csp { + + private static final String NODE_CODE_STYLE = "CodeStyle"; //NOI18N + private static final String PROP_USED_PROFILE = "usedProfile"; // NOI18N + private static final String DEFAULT_PROFILE = "default"; // NOI18N + private static final String PROJECT_PROFILE = "project"; // NOI18N + + private final String mimeType; + private final Reference refDoc; + private final String filePath; + + private final Preferences globalPrefs; + private Preferences projectPrefs; + private boolean useProject; + + private final PreferenceChangeListener switchTrakcer = new PreferenceChangeListener() { + public @Override void preferenceChange(PreferenceChangeEvent evt) { + if (evt.getKey() == null || PROP_USED_PROFILE.equals(evt.getKey())) { + synchronized (Csp.this) { + useProject = PROJECT_PROFILE.equals(evt.getNewValue()); + LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences"); //NOI18N + } + } + } + }; + + public Csp(String mimeType, Reference refDoc, final FileObject file) { + this.mimeType = mimeType; + this.refDoc = refDoc; + this.filePath = file == null ? "no file" : file.getPath(); //NOI18N just for logging + + this.globalPrefs = MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class); + this.projectPrefs = null; + this.useProject = false; + + ProjectManager.mutex().postReadRequest(new Runnable() { + public @Override void run() { + synchronized (Csp.this) { + Preferences projectRoot = findProjectPreferences(file); + if (projectRoot != null) { + Preferences allLangCodeStyle = projectRoot.node(NODE_CODE_STYLE); + Preferences p = allLangCodeStyle.node(PROJECT_PROFILE); + + // determine if we are using code style preferences from the project + String usedProfile = allLangCodeStyle.get(PROP_USED_PROFILE, DEFAULT_PROFILE); + useProject = PROJECT_PROFILE.equals(usedProfile); + projectPrefs = Csp.this.mimeType == null ? + p : + new ProxyPreferences(projectRoot.node(Csp.this.mimeType).node(NODE_CODE_STYLE).node(PROJECT_PROFILE), p); + + // listen on changes + allLangCodeStyle.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, switchTrakcer, allLangCodeStyle)); + } else { + useProject = false; + projectPrefs = null; + } + } + } + }); + + LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences; doc=" + s2s(refDoc == null ? null : refDoc.get())); //NOI18N + } + + public Preferences getPreferences() { + synchronized (this) { + Preferences prefs = useProject ? projectPrefs : globalPrefs; + // to support tests that don't use editor.mimelookup.impl + return prefs == null ? AbstractPreferences.systemRoot() : prefs; + } + } + + } // End of Csp class + + private static Preferences findProjectPreferences(FileObject file) { + if (file != null) { + Project p = FileOwnerQuery.getOwner(file); + if (p != null) { + return ProjectUtils.getPreferences(p, IndentUtils.class, true); + } + } + return null; + } + + private static FileObject findFileObject(Document doc) { + if (doc != null) { + Object sdp = doc.getProperty(Document.StreamDescriptionProperty); + if (sdp instanceof DataObject) { + return ((DataObject) sdp).getPrimaryFile(); + } else if (sdp instanceof FileObject) { + return (FileObject) sdp; + } + } + return null; + } + + private static String s2s(Object o) { + return o == null ? "null" : o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o)); //NOI18N + } +} --- a/editor.indent/src/org/netbeans/modules/editor/indent/ProxyPreferences.java +++ a/editor.indent/src/org/netbeans/modules/editor/indent/ProxyPreferences.java @@ -37,7 +37,7 @@ * Portions Copyrighted 2008 Sun Microsystems, Inc. */ -package org.netbeans.modules.editor.indent; +package org.netbeans.modules.editor.indent.project; import java.lang.reflect.Method; import java.util.Arrays; --- a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/api/Customizers.java +++ a/editor.indent.project/src/org/netbeans/modules/editor/indent/project/api/Customizers.java @@ -0,0 +1,75 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2010 Sun Microsystems, Inc. + */ + +package org.netbeans.modules.editor.indent.project.api; + +import java.util.Map; +import org.netbeans.modules.editor.indent.project.FormattingCustomizerPanel.Factory; +import org.netbeans.spi.project.ui.support.ProjectCustomizer; + +/** + * + * @author Vita Stejskal + */ +public final class Customizers { + + private Customizers() { + // no-op + } + + /** + * Creates an instance of the 'Formatting' category in the project properties dialog. + * This method is meant to be used from XML layers by modules that wish to add + * the 'Formatting' category to their project type's properties dialog. + * + *

The method recognizes 'allowedMimeTypes' XML layer attribute, which should + * contain the comma separated list of mime types, which formatting settings + * customizers should be made available for the project. If the attribute is + * not specified all registered customizers are shown. If the attribute specifies + * an empty list only the 'All Languages' customizer is shown. + * + * @param attrs The map of FileObject attributes + * + * @return A new 'Formatting' category provider. + * @since 1.0 + */ + public static ProjectCustomizer.CompositeCategoryProvider createFormattingCategoryProvider(Map attrs) { + return new Factory((String)attrs.get("allowedMimeTypes")); //NOI18N + } +} --- a/editor.indent.project/test/unit/src/org/netbeans/modules/editor/indent/project/ProxyPreferencesTest.java +++ a/editor.indent.project/test/unit/src/org/netbeans/modules/editor/indent/project/ProxyPreferencesTest.java @@ -0,0 +1,60 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2010 Sun Microsystems, Inc. + */ + +package org.netbeans.modules.editor.indent.project; + +import org.netbeans.junit.NbTestCase; +import org.netbeans.junit.RandomlyFails; + +/** + * + * @author vita + */ +public class ProxyPreferencesTest extends NbTestCase { + + public ProxyPreferencesTest(String name) { + super(name); + } + + @RandomlyFails + public void testSomeMethod() { + // dummy + } + +} --- a/editor.indent/apichanges.xml +++ a/editor.indent/apichanges.xml @@ -105,6 +105,21 @@ + +

Adding CodeStylePreferences.Provider + + + + + + Adding CodeStylePreferences.Provider interface in order to allow + isolating the project-dependent code style preferences storage from the rest + of the editor infrastructure. + + + + + Enhance Context class with Lookup so that indenters can communicate with each other. --- a/editor.indent/manifest.mf +++ a/editor.indent/manifest.mf @@ -3,3 +3,4 @@ OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/indent/Bundle.properties OpenIDE-Module-Layer: org/netbeans/modules/editor/indent/resources/layer.xml AutoUpdate-Show-In-Client: false +OpenIDE-Module-Recommends: org.netbeans.modules.editor.indent.spi.CodeStylePreferences.Provider --- a/editor.indent/nbproject/project.properties +++ a/editor.indent/nbproject/project.properties @@ -39,7 +39,7 @@ javac.source=1.6 javac.compilerargs=-Xlint:unchecked -spec.version.base=1.17.0 +spec.version.base=1.18.0 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml --- a/editor.indent/nbproject/project.xml +++ a/editor.indent/nbproject/project.xml @@ -92,15 +92,6 @@
- org.netbeans.modules.projectapi - - - - 1 - 1.17 - - - org.openide.filesystems --- a/editor.indent/src/org/netbeans/modules/editor/indent/spi/CodeStylePreferences.java +++ a/editor.indent/src/org/netbeans/modules/editor/indent/spi/CodeStylePreferences.java @@ -39,29 +39,14 @@ package org.netbeans.modules.editor.indent.spi; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; -import java.util.HashMap; -import java.util.Map; -import java.util.WeakHashMap; +import java.util.Collection; import java.util.logging.Logger; -import java.util.prefs.AbstractPreferences; -import java.util.prefs.PreferenceChangeEvent; -import java.util.prefs.PreferenceChangeListener; import java.util.prefs.Preferences; import javax.swing.text.Document; import org.netbeans.api.editor.mimelookup.MimeLookup; import org.netbeans.api.editor.mimelookup.MimePath; -import org.netbeans.api.project.FileOwnerQuery; -import org.netbeans.api.project.Project; -import org.netbeans.api.project.ProjectManager; -import org.netbeans.api.project.ProjectUtils; -import org.netbeans.modules.editor.indent.ProxyPreferences; -import org.netbeans.modules.editor.indent.api.IndentUtils; import org.openide.filesystems.FileObject; -import org.openide.loaders.DataObject; -import org.openide.util.Utilities; -import org.openide.util.WeakListeners; +import org.openide.util.Lookup; /** * Provides access to formatting settings for a document or file. The formatting @@ -118,9 +103,9 @@ */ public static CodeStylePreferences get(Document doc, String mimeType) { if (doc != null) { - return getPreferences(doc, mimeType); + return new CodeStylePreferences(doc, mimeType); } else { - return getPreferences(null, null); + return new CodeStylePreferences(null, null); } } @@ -152,171 +137,95 @@ */ public static CodeStylePreferences get(FileObject file, String mimeType) { if (file != null) { - return getPreferences(file, mimeType); //NOI18N + return new CodeStylePreferences(file, mimeType); //NOI18N } else { - return getPreferences(null, null); + return new CodeStylePreferences(null, null); } } public Preferences getPreferences() { - synchronized (this) { - // This is here solely for the purpose of previewing changes in formatting settings - // in Tools-Options. This is NOT, repeat NOT, to be used by anybody else! - // The name of this property is also hardcoded in options.editor/.../IndentationPanel.java - Document doc = refDoc == null ? null : refDoc.get(); - Object o = doc == null ? null : doc.getProperty("Tools-Options->Editor->Formatting->Preview - Preferences"); //NOI18N - if (o instanceof Preferences) { - return (Preferences) o; - } else { - Preferences prefs = useProject ? projectPrefs : globalPrefs; - // to support tests that don't use editor.mimelookup.impl - return prefs == null ? AbstractPreferences.systemRoot() : prefs; + // This is here solely for the purpose of previewing changes in formatting settings + // in Tools-Options. This is NOT, repeat NOT, to be used by anybody else! + // The name of this property is also hardcoded in options.editor/.../IndentationPanel.java + Document doc = docOrFile instanceof Document ? (Document) docOrFile : null; + Object o = doc == null ? null : doc.getProperty("Tools-Options->Editor->Formatting->Preview - Preferences"); //NOI18N + if (o instanceof Preferences) { + return (Preferences) o; + } else { + Preferences prefs = null; + Provider provider = null; + + Collection providers = Lookup.getDefault().lookupAll(Provider.class); + for(Provider p : providers) { + if (doc != null) { + prefs = p.forDocument(doc, mimeType); + } else { + prefs = p.forFile((FileObject)docOrFile, mimeType); + } + if (prefs != null) { + provider = p; + break; + } } + + if (prefs == null) { + provider = defaultProvider; + if (doc != null) { + prefs = provider.forDocument(doc, mimeType); + } else { + prefs = provider.forFile((FileObject)docOrFile, mimeType); + } + } + + assert prefs != null : "provider=" + s2s(provider) + ", docOrFile=" + s2s(docOrFile) + ", mimeType='" + mimeType + "'"; //NOI18N + return prefs; } } - - // ---------------------------------------------------------------------- - // private implementation - // ---------------------------------------------------------------------- - + + /** + * Code style preferences provider. This interface allows to implement your own + * code style preferences storage. Implementations ought to be registered in the + * default lookup (ie. through @ServiceProvider annotation). + * + *

Usual API clients do not have to be concerned about this. It was created + * in order to seprate the project-dependent implementation of code style preferences + * storage from the rest of the editor infrastructure. + * + * @Since 1.18 + */ + public static interface Provider { + Preferences forFile(FileObject file, String mimeType); + Preferences forDocument(Document doc, String mimeType); + } + + // ------------------------------------------------------------------------ + // Private implementation + // ------------------------------------------------------------------------ + private static final Logger LOG = Logger.getLogger(CodeStylePreferences.class.getName()); - - private static final String NODE_CODE_STYLE = "CodeStyle"; //NOI18N - private static final String PROP_USED_PROFILE = "usedProfile"; // NOI18N - private static final String DEFAULT_PROFILE = "default"; // NOI18N - private static final String PROJECT_PROFILE = "project"; // NOI18N - private static final Map> cache = new WeakHashMap>(); - + private final Object docOrFile; private final String mimeType; - private final Reference refDoc; - private final String filePath; - - private final Preferences globalPrefs; - private Preferences projectPrefs; - private boolean useProject; - private final PreferenceChangeListener switchTrakcer = new PreferenceChangeListener() { - public void preferenceChange(PreferenceChangeEvent evt) { - if (evt.getKey() == null || PROP_USED_PROFILE.equals(evt.getKey())) { - synchronized (this) { - useProject = PROJECT_PROFILE.equals(evt.getNewValue()); - LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences"); //NOI18N - } - } + private CodeStylePreferences(Object docOrFile, String mimeType) { + this.docOrFile = docOrFile; + this.mimeType = mimeType; + } + + private static final Provider defaultProvider = new Provider() { + + @Override + public Preferences forFile(FileObject file, String mimeType) { + return MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class); + } + + @Override + public Preferences forDocument(Document doc, String mimeType) { + return MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class); } }; - - private static CodeStylePreferences getPreferences(final Object obj, final String mimeType) { -// return ProjectManager.mutex().readAccess(new Mutex.Action() { -// public CodeStylePreferences run() { - synchronized (cache) { - Map csps = cache.get(obj); - CodeStylePreferences csp = csps != null ? csps.get(mimeType) : null; - if (csp == null) { - Document doc; - FileObject file; - - if (obj instanceof FileObject) { - doc = null; - file = (FileObject) obj; - } else { - doc = (Document) obj; - file = findFileObject(doc); - } - - csp = new CodeStylePreferences( - mimeType, - doc == null ? null : new CleaningWeakReference(doc), - file); - if (csps == null) { - csps = new HashMap(); - cache.put(obj, csps); - } - csps.put(mimeType, csp); - } - - return csp; - } -// } -// }); - } - - private static final class CleaningWeakReference extends WeakReference implements Runnable { - - public CleaningWeakReference(Document referent) { - super(referent, Utilities.activeReferenceQueue()); - } - - public void run() { - synchronized (cache) { - //expunge stale entries from the cache: - cache.size(); - } - } - - } - - private CodeStylePreferences(String mimeType, Reference refDoc, final FileObject file) { - this.mimeType = mimeType; - this.refDoc = refDoc; - this.filePath = file == null ? "no file" : file.getPath(); //NOI18N just for logging - - this.globalPrefs = MimeLookup.getLookup(mimeType == null ? MimePath.EMPTY : MimePath.parse(mimeType)).lookup(Preferences.class); - this.projectPrefs = null; - this.useProject = false; - - ProjectManager.mutex().postReadRequest(new Runnable() { - public void run() { - synchronized (CodeStylePreferences.this) { - Preferences projectRoot = findProjectPreferences(file); - if (projectRoot != null) { - Preferences allLangCodeStyle = projectRoot.node(NODE_CODE_STYLE); - Preferences p = allLangCodeStyle.node(PROJECT_PROFILE); - - // determine if we are using code style preferences from the project - String usedProfile = allLangCodeStyle.get(PROP_USED_PROFILE, DEFAULT_PROFILE); - useProject = PROJECT_PROFILE.equals(usedProfile); - projectPrefs = CodeStylePreferences.this.mimeType == null ? - p : - new ProxyPreferences(projectRoot.node(CodeStylePreferences.this.mimeType).node(NODE_CODE_STYLE).node(PROJECT_PROFILE), p); - - // listen on changes - allLangCodeStyle.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, switchTrakcer, allLangCodeStyle)); - } else { - useProject = false; - projectPrefs = null; - } - } - } - }); - - LOG.fine("file '" + filePath + "' (" + mimeType + ") is using " + (useProject ? "project" : "global") + " Preferences; doc=" + s2s(refDoc == null ? null : refDoc.get())); //NOI18N - } - - private static final Preferences findProjectPreferences(FileObject file) { - if (file != null) { - Project p = FileOwnerQuery.getOwner(file); - if (p != null) { - return ProjectUtils.getPreferences(p, IndentUtils.class, true); - } - } - return null; - } - - private static final FileObject findFileObject(Document doc) { - if (doc != null) { - Object sdp = doc.getProperty(Document.StreamDescriptionProperty); - if (sdp instanceof DataObject) { - return ((DataObject) sdp).getPrimaryFile(); - } else if (sdp instanceof FileObject) { - return (FileObject) sdp; - } - } - return null; - } private static String s2s(Object o) { - return o == null ? "null" : o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o)); + return o == null ? "null" : o.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(o)); //NOI18N } } --- a/editor.settings.storage/nbproject/project.xml +++ a/editor.settings.storage/nbproject/project.xml @@ -158,6 +158,7 @@ org.netbeans.modules.dlight.annotationsupport org.netbeans.modules.editor.codetemplates org.netbeans.modules.editor.deprecated.pre61settings + org.netbeans.modules.editor.indent.project org.netbeans.modules.editor.macros org.netbeans.modules.gsf org.netbeans.modules.jvi --- a/groovy.grailsproject/nbproject/project.xml +++ a/groovy.grailsproject/nbproject/project.xml @@ -139,6 +139,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.options.api @@ -148,15 +157,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.projectapi --- a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/resources/layer.xml +++ a/groovy.grailsproject/src/org/netbeans/modules/groovy/grailsproject/resources/layer.xml @@ -150,7 +150,7 @@ - + --- a/j2ee.clientproject/nbproject/project.xml +++ a/j2ee.clientproject/nbproject/project.xml @@ -122,6 +122,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.j2ee.api.ejbmodule @@ -231,15 +240,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.project.ant --- a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/resources/layer.xml +++ a/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/ui/resources/layer.xml @@ -113,7 +113,7 @@ - + --- a/j2ee.ejbjarproject/nbproject/project.xml +++ a/j2ee.ejbjarproject/nbproject/project.xml @@ -133,6 +133,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.editor.lib @@ -275,15 +284,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.project.ant --- a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/resources/layer.xml +++ a/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/ui/resources/layer.xml @@ -112,7 +112,7 @@ - + --- a/java.source/nbproject/project.xml +++ a/java.source/nbproject/project.xml @@ -132,6 +132,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.editor.lib @@ -226,7 +235,7 @@ 1 - 1.8 + 1.19 --- a/java.source/src/org/netbeans/modules/java/source/resources/layer.xml +++ a/java.source/src/org/netbeans/modules/java/source/resources/layer.xml @@ -225,7 +225,7 @@ - + --- a/maven/nbproject/project.xml +++ a/maven/nbproject/project.xml @@ -118,6 +118,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.extexecution @@ -198,15 +207,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.18 - - - org.netbeans.modules.project.ant --- a/maven/src/org/netbeans/modules/maven/layer.xml +++ a/maven/src/org/netbeans/modules/maven/layer.xml @@ -132,7 +132,7 @@ - + --- a/nbbuild/cluster.properties +++ a/nbbuild/cluster.properties @@ -303,6 +303,7 @@ editor.fold,\ editor.guards,\ editor.indent,\ + editor.indent.project,\ editor.kit,\ editor.lib,\ editor.lib2,\ --- a/options.editor/apichanges.xml +++ a/options.editor/apichanges.xml @@ -107,6 +107,22 @@ + + +

Moving FormattingCustomizerPanel to editor.indent.project module + + + + + +

+ Moving FormattingCustomizerPanel class to editor.indent.project module. +

+
+ + + + Adding OptionsFilter to allow filtering inside the options dialog --- a/options.editor/manifest.mf +++ a/options.editor/manifest.mf @@ -2,6 +2,6 @@ OpenIDE-Module: org.netbeans.modules.options.editor/1 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/options/editor/Bundle.properties OpenIDE-Module-Layer: org/netbeans/modules/options/editor/mf-layer.xml -OpenIDE-Module-Specification-Version: 1.19 +OpenIDE-Module-Specification-Version: 1.20 AutoUpdate-Show-In-Client: false --- a/options.editor/module-auto-deps.xml +++ a/options.editor/module-auto-deps.xml @@ -0,0 +1,60 @@ + + + + + + + + #178311: Separate project-related stuff from the rest of the editor infrastructure + + + + + + + + + + + + --- a/options.editor/nbproject/project.xml +++ a/options.editor/nbproject/project.xml @@ -145,24 +145,6 @@
- org.netbeans.modules.projectapi - - - - 1 - 1.19 - - - - org.netbeans.modules.projectuiapi - - - - 1 - 1.31 - - - org.openide.actions @@ -373,6 +355,7 @@ org.netbeans.modules.cnd.completion org.netbeans.modules.cnd.editor org.netbeans.modules.diff + org.netbeans.modules.editor.indent.project org.netbeans.modules.groovy.grailsproject org.netbeans.modules.html.editor org.netbeans.modules.j2ee.clientproject @@ -396,6 +379,7 @@ org.netbeans.modules.options.colors org.netbeans.modules.options.colors.spi org.netbeans.modules.options.editor.spi + org.netbeans.modules.options.indentation --- a/options.editor/src/META-INF/netbeans/translate.names +++ a/options.editor/src/META-INF/netbeans/translate.names @@ -0,0 +1,1 @@ +org.netbeans.modules.options.indentation.FormattingCustomizerPanel=org.netbeans.modules.editor.indent.project.FormattingCustomizerPanel --- a/options.editor/src/org/netbeans/modules/options/indentation/Bundle.properties +++ a/options.editor/src/org/netbeans/modules/options/indentation/Bundle.properties @@ -73,19 +73,6 @@ AD_Preview=Preview MSG_no_preview_available=Preview not available -#FormattingCustomizerPanel -LBL_CategoryFormatting=Formatting -LBL_FormattingCustomizer_Global=Use &global options -LBL_FormattingCustomizer_Project=Use &project specific options -LBL_FormattingCustomizer_EditGlobal=&Edit global options -LBL_ForamttingCustomizer_Load=Load from &other project - -# Messages in FormattingCustomizerPanel -MSG_CodeStyle_Import_Forbidden_From_The_Same_Project=Loading formatting settings from the same project is not allowed. -MSG_No_CodeStyle_Info_To_Import=The project you chose contains no formatting settings. -MSG_CodeStyle_Import_Successful=The formatting settings were successfully imported. -MSG_CodeStyle_Import_Failed=Importing the formatting settings failed. - #TabsAndIndentsPanel #LBL_ExpandTabToSpaces=&Expand Tab to Spaces #LBL_TabSize=&Tab Size: @@ -94,17 +81,10 @@ LBL_AllLanguages=All Languages #LBL_TabsAndIndents=Tabs and Indents -#FormattingCustomizerPanel -MSG_use_global_settings_confirmation=This will remove all formatting settings and their customizations from this project. Do you want to proceed? -MSG_use_global_settings_confirmation_title=Use global formatting settings FormattingPanel.languageCombo.AccessibleContext.accessibleDescription=Language list. FormattingPanel.languageCombo.AccessibleContext.accessibleName=Language FormattingPanel.categoryCombo.AccessibleContext.accessibleDescription=Category list. FormattingPanel.categoryCombo.AccessibleContext.accessibleName=Category -FormattingCustomizerPanel.editGlobalButton.AccessibleContext.accessibleDescription=Edit global options -FormattingCustomizerPanel.loadButton.AccessibleContext.accessibleDescription=Load from other project -FormattingCustomizerPanel.globalButton.AccessibleContext.accessibleDescription=Use global options -FormattingCustomizerPanel.projectButton.AccessibleContext.accessibleDescription=Use project specific options AD_Language=Language AD_Category=Category --- a/php.project/nbproject/project.xml +++ a/php.project/nbproject/project.xml @@ -101,6 +101,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.editor.lib @@ -161,15 +170,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.php.api.phpmodule --- a/php.project/src/org/netbeans/modules/php/project/resources/layer.xml +++ a/php.project/src/org/netbeans/modules/php/project/resources/layer.xml @@ -187,7 +187,7 @@ - + --- a/ruby.project/nbproject/project.xml +++ a/ruby.project/nbproject/project.xml @@ -60,6 +60,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.editor.lib @@ -104,15 +113,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.parsing.api --- a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/ui/resources/layer.xml +++ a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/ui/resources/layer.xml @@ -218,7 +218,7 @@ --> - + --- a/ruby.railsprojects/nbproject/project.xml +++ a/ruby.railsprojects/nbproject/project.xml @@ -68,6 +68,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.editor.lib @@ -95,15 +104,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.projectapi --- a/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/ui/resources/layer.xml +++ a/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/ui/resources/layer.xml @@ -114,13 +114,13 @@ - - - - + + + + - + --- a/web.project/nbproject/project.xml +++ a/web.project/nbproject/project.xml @@ -135,6 +135,15 @@ + org.netbeans.modules.editor.indent.project + + + + 0-1 + 1.0 + + + org.netbeans.modules.j2ee.api.ejbmodule @@ -261,15 +270,6 @@ - org.netbeans.modules.options.editor - - - - 1 - 1.10 - - - org.netbeans.modules.project.ant --- a/web.project/src/org/netbeans/modules/web/project/ui/resources/layer.xml +++ a/web.project/src/org/netbeans/modules/web/project/ui/resources/layer.xml @@ -132,7 +132,7 @@ - +