mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
war against zombies: 18 killed
This commit is contained in:
@@ -47,10 +47,8 @@ public class ArtifactsGenerator {
|
||||
private final PackagingElementResolvingContext myResolvingContext;
|
||||
private final ArtifactAntGenerationContextImpl myContext;
|
||||
private final List<Artifact> myAllArtifacts;
|
||||
private final GenerationOptions myGenOptions;
|
||||
|
||||
public ArtifactsGenerator(Project project, GenerationOptions genOptions) {
|
||||
myGenOptions = genOptions;
|
||||
myResolvingContext = ArtifactManager.getInstance(project).getResolvingContext();
|
||||
|
||||
myAllArtifacts = new ArrayList<Artifact>(Arrays.asList(ArtifactManager.getInstance(project).getSortedArtifacts()));
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.compiler.impl.packagingCompiler;
|
||||
|
||||
/*
|
||||
* @author: Eugene Zhuravlev
|
||||
* Date: Jan 23, 2003
|
||||
* Time: 2:58:25 PM
|
||||
*/
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.compiler.CompilerConfigurationImpl;
|
||||
import com.intellij.compiler.CompilerIOUtil;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.compiler.CompilerBundle;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class MapCache <T> {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.impl.MapCache");
|
||||
|
||||
protected Map<String, T> myMap = null;
|
||||
protected final File myStoreFile;
|
||||
private boolean myIsDirty = false;
|
||||
|
||||
MapCache(String storePath) {
|
||||
myStoreFile = new File(storePath);
|
||||
}
|
||||
|
||||
public boolean isDirty() {
|
||||
return myIsDirty;
|
||||
}
|
||||
|
||||
protected void setDirty() {
|
||||
myIsDirty = true;
|
||||
}
|
||||
|
||||
protected boolean load() {
|
||||
if (myMap == null) {
|
||||
myMap = new HashMap<String, T>();
|
||||
myIsDirty = false;
|
||||
if (myStoreFile.exists() && myStoreFile.length() > 0L) {
|
||||
try {
|
||||
byte[] bytes = FileUtil.loadFileBytes(myStoreFile);
|
||||
DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(bytes));
|
||||
try {
|
||||
int version = inputStream.readInt();
|
||||
if (version == CompilerConfigurationImpl.DEPENDENCY_FORMAT_VERSION) {
|
||||
int size = inputStream.readInt();
|
||||
myMap = new HashMap<String,T>();
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
String key = CompilerIOUtil.readString(inputStream);
|
||||
T value = read(inputStream);
|
||||
myMap.put(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
catch (Throwable e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected abstract T read(DataInputStream stream) throws IOException;
|
||||
|
||||
protected abstract void write(T t, DataOutputStream stream) throws IOException;
|
||||
|
||||
public void save() {
|
||||
if (myMap == null) {
|
||||
return; // nothing to save
|
||||
}
|
||||
try {
|
||||
FileUtil.createParentDirs(myStoreFile);
|
||||
final DataOutputStream outStream = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(myStoreFile)));
|
||||
|
||||
try {
|
||||
outStream.writeInt(CompilerConfigurationImpl.DEPENDENCY_FORMAT_VERSION);
|
||||
final Iterator<String> keysIterator = myMap.keySet().iterator();
|
||||
outStream.writeInt(myMap.size());
|
||||
while (keysIterator.hasNext()) {
|
||||
final String key = keysIterator.next();
|
||||
final T value = myMap.get(key);
|
||||
CompilerIOUtil.writeString(key, outStream);
|
||||
write(value, outStream);
|
||||
}
|
||||
myIsDirty = false;
|
||||
}
|
||||
finally {
|
||||
outStream.close();
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
final String message = CompilerBundle.message("error.saving.data.to.file", myStoreFile.getPath(), e.getMessage());
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
Messages.showMessageDialog(message, CommonBundle.getWarningTitle(), Messages.getWarningIcon());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean wipe() {
|
||||
myMap = null;
|
||||
myIsDirty = false;
|
||||
return myStoreFile.delete();
|
||||
}
|
||||
|
||||
}
|
||||
-87
@@ -1,87 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.compiler.impl.packagingCompiler;
|
||||
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class PackagingCompilerCache extends MapCache<Long> {
|
||||
public PackagingCompilerCache(@NonNls String storePath) {
|
||||
super(storePath);
|
||||
}
|
||||
|
||||
public Long read(DataInputStream stream) throws IOException {
|
||||
return stream.readLong();
|
||||
}
|
||||
|
||||
public void write(Long aLong, DataOutputStream stream) throws IOException {
|
||||
stream.writeLong(aLong.longValue());
|
||||
}
|
||||
|
||||
public void update(@NonNls String url, Long state){
|
||||
if (!load()) {
|
||||
return;
|
||||
}
|
||||
if (state != null) {
|
||||
myMap.put(url, state);
|
||||
setDirty();
|
||||
}
|
||||
else {
|
||||
remove(url);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove(String url){
|
||||
if (!load()) {
|
||||
return;
|
||||
}
|
||||
myMap.remove(url);
|
||||
setDirty();
|
||||
}
|
||||
|
||||
public Long getState(String url){
|
||||
if (!load()) {
|
||||
return null;
|
||||
}
|
||||
return myMap.get(url);
|
||||
}
|
||||
|
||||
public String[] getUrls() {
|
||||
if (!load()) {
|
||||
return ArrayUtil.EMPTY_STRING_ARRAY;
|
||||
}
|
||||
String[] urls = ArrayUtil.newStringArray(myMap.size());
|
||||
int idx = 0;
|
||||
for (final String s : myMap.keySet()) {
|
||||
urls[idx++] = s;
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
|
||||
public Iterator<String> getUrlsIterator() {
|
||||
if (!load()) {
|
||||
return Arrays.asList(ArrayUtil.EMPTY_STRING_ARRAY).iterator();
|
||||
}
|
||||
return myMap.keySet().iterator();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -145,11 +145,6 @@ public class FacetDetectionIndex extends AbstractFileIndex<FacetDetectionIndexEn
|
||||
return myDetectedFacetIds.getKeys(id);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Set<String> getFiles(final FacetPointer pointer) {
|
||||
return myFacets.getKeys(pointer);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Set<String> getFiles(final Facet facet) {
|
||||
return myFacets.getKeys(myFacetPointersManager.create(facet));
|
||||
|
||||
+1
-8
@@ -20,9 +20,9 @@ import com.intellij.facet.FacetType;
|
||||
import com.intellij.facet.autodetecting.DetectedFacetPresentation;
|
||||
import com.intellij.facet.impl.autodetecting.FacetDetectorRegistryEx;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.ui.CheckboxTreeBase;
|
||||
import com.intellij.ui.CheckedTreeNode;
|
||||
import com.intellij.ui.ColoredTreeCellRenderer;
|
||||
@@ -30,7 +30,6 @@ import com.intellij.ui.SimpleTextAttributes;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.TreePath;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -58,12 +57,6 @@ public class DetectedFacetsTree extends CheckboxTreeBase {
|
||||
return root;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public CheckedTreeNode getSelectedNode() {
|
||||
TreePath path = getSelectionPath();
|
||||
return path != null ? (CheckedTreeNode)path.getLastPathComponent() : null;
|
||||
}
|
||||
|
||||
private static class FacetsCheckboxTreeCellRenderer extends CheckboxTreeCellRendererBase {
|
||||
public void customizeCellRenderer(final JTree tree,
|
||||
final Object value,
|
||||
|
||||
@@ -79,14 +79,6 @@ public class FacetTreeModel {
|
||||
return getChildren(null);
|
||||
}
|
||||
|
||||
public void deleteFacetWithChildren(final FacetInfo info) {
|
||||
final List<FacetInfo> children = getChildren(info);
|
||||
for (FacetInfo child : children) {
|
||||
deleteFacetWithChildren(child);
|
||||
}
|
||||
removeFacetInfo(info);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public FacetInfo findNearestFacet(@NotNull FacetInfo info) {
|
||||
final FacetInfo parent = getParent(info);
|
||||
|
||||
+6
-12
@@ -16,18 +16,16 @@
|
||||
|
||||
package com.intellij.facet.impl.ui.libraries;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.openapi.roots.ModuleRootModel;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.roots.impl.libraries.ProjectLibraryTable;
|
||||
import com.intellij.openapi.roots.ui.configuration.ModulesProvider;
|
||||
import com.intellij.openapi.roots.ModuleRootModel;
|
||||
import com.intellij.openapi.roots.ui.configuration.DefaultModulesProvider;
|
||||
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory;
|
||||
import com.intellij.openapi.roots.ui.configuration.ModulesProvider;
|
||||
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
|
||||
import com.intellij.openapi.roots.libraries.LibraryTable;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
@@ -51,10 +49,6 @@ public class LibrariesValidatorContextImpl implements LibrariesValidatorContext
|
||||
return null;
|
||||
}
|
||||
|
||||
private LibraryTable getProjectLibraryTable() {
|
||||
return ProjectLibraryTable.getInstance(myModule.getProject());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ModulesProvider getModulesProvider() {
|
||||
return new DefaultModulesProvider(myModule.getProject());
|
||||
|
||||
@@ -17,7 +17,6 @@ package com.intellij.ide.util.newProjectWizard;
|
||||
|
||||
import com.intellij.facet.impl.ui.libraries.LibraryCompositionSettings;
|
||||
import com.intellij.facet.impl.ui.libraries.LibraryOptionsPanel;
|
||||
import com.intellij.facet.ui.libraries.LibraryInfo;
|
||||
import com.intellij.ide.util.frameworkSupport.*;
|
||||
import com.intellij.ide.util.newProjectWizard.impl.FrameworkSupportModelImpl;
|
||||
import com.intellij.openapi.Disposable;
|
||||
@@ -121,11 +120,6 @@ public class FrameworkSupportNode extends CheckedTreeNode {
|
||||
|| !Comparing.equal(settings.getLibraryDescription(), getOrCreateLibraryDescription());
|
||||
}
|
||||
|
||||
public LibraryInfo[] getLibraries() {
|
||||
final FrameworkVersion version = myConfigurable.getSelectedVersion();
|
||||
return version != null ? version.getLibraries() : LibraryInfo.EMPTY_ARRAY;
|
||||
}
|
||||
|
||||
public boolean isSettingsObsolete() {
|
||||
return myLibraryCompositionSettings == null || isObsolete(myLibraryCompositionSettings);
|
||||
}
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ide.util.projectWizard;
|
||||
|
||||
import com.intellij.openapi.ui.MultiLineLabelUI;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ItemListener;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: Jan 21, 2004
|
||||
*/
|
||||
public class ModuleCreationPromptStep extends ModuleWizardStep {
|
||||
private static final Icon NEW_PROJECT_ICON = IconLoader.getIcon("/newprojectwizard.png");
|
||||
private final JPanel myPanel;
|
||||
private final JRadioButton myRbCreateSingle;
|
||||
private final JRadioButton myRbCreateMultiple;
|
||||
|
||||
public ModuleCreationPromptStep() {
|
||||
myPanel = new JPanel(new GridBagLayout());
|
||||
myPanel.setBorder(BorderFactory.createEtchedBorder());
|
||||
final String promptText =
|
||||
IdeBundle.message("prompt.single.or.multi.module.project", ApplicationNamesInfo.getInstance().getProductName());
|
||||
final JLabel promptLabel = new JLabel(promptText);
|
||||
promptLabel.setUI(new MultiLineLabelUI());
|
||||
myPanel.add(promptLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(8, 10, 8, 10), 0, 0));
|
||||
|
||||
myRbCreateSingle = new JRadioButton(IdeBundle.message("radio.create.&single.module.project"), true);
|
||||
myRbCreateMultiple = new JRadioButton(IdeBundle.message("radio.create.configure.&multi.module.project"));
|
||||
myPanel.add(myRbCreateSingle, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(8, 6, 0, 6), 0, 0));
|
||||
myPanel.add(myRbCreateMultiple, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(5, 6, 0, 6), 0, 0));
|
||||
|
||||
ButtonGroup group = new ButtonGroup();
|
||||
group.add(myRbCreateSingle);
|
||||
group.add(myRbCreateMultiple);
|
||||
|
||||
}
|
||||
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
return myRbCreateSingle;
|
||||
}
|
||||
|
||||
public String getHelpId() {
|
||||
return "project.new.page3";
|
||||
}
|
||||
|
||||
public JComponent getComponent() {
|
||||
return myPanel;
|
||||
}
|
||||
|
||||
public void updateDataModel() {
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return NEW_PROJECT_ICON;
|
||||
}
|
||||
|
||||
public boolean isCreateModule() {
|
||||
return myRbCreateSingle.isSelected();
|
||||
}
|
||||
|
||||
public void addCreateModuleChoiceListener(ItemListener listener) {
|
||||
myRbCreateSingle.addItemListener(listener);
|
||||
}
|
||||
}
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: Oct 31
|
||||
* @author 2003
|
||||
*/
|
||||
public class ActionsHeaderComponent extends JPanel/*ScalableIconComponent*/ {
|
||||
private static final int HEADER_Y_OFFSET = 4;
|
||||
private JLabel myHeaderLabel;
|
||||
|
||||
public void addNotify() {
|
||||
super.addNotify();
|
||||
final Dimension preferredSize = new Dimension(0, 0);
|
||||
calcPreferredSize(this, preferredSize);
|
||||
preferredSize.height += HEADER_Y_OFFSET;
|
||||
this.setPreferredSize(preferredSize);
|
||||
}
|
||||
|
||||
public void setHeaderTextColor(Color color) {
|
||||
myHeaderLabel.setForeground(color);
|
||||
}
|
||||
|
||||
private void calcPreferredSize(Container container, Dimension dimension) {
|
||||
final Component[] components = container.getComponents();
|
||||
int maxWidth = 0;
|
||||
int maxHeight = 0;
|
||||
for (Component component : components) {
|
||||
if (component instanceof Container) {
|
||||
calcPreferredSize((Container)component, dimension);
|
||||
maxWidth = Math.max(maxWidth, dimension.width);
|
||||
maxHeight = Math.max(maxHeight, dimension.height);
|
||||
}
|
||||
else {
|
||||
final Dimension preferredSize = component.getPreferredSize();
|
||||
maxWidth = Math.max(maxWidth, preferredSize.width);
|
||||
maxHeight = Math.max(maxHeight, preferredSize.height);
|
||||
}
|
||||
}
|
||||
final Dimension preferredSize = container.getPreferredSize();
|
||||
dimension.width = Math.max(maxWidth, preferredSize.width);
|
||||
dimension.height = Math.max(maxHeight, preferredSize.height);
|
||||
}
|
||||
|
||||
public final void setSelected(boolean isSelected) {
|
||||
setBackground(isSelected? UIUtil.getTableSelectionBackground() : UIUtil.getTableBackground());
|
||||
myHeaderLabel.setForeground(isSelected? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground());
|
||||
this.revalidate();
|
||||
this.repaint();
|
||||
}
|
||||
}
|
||||
-99
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Anna.Kozlova
|
||||
* Date: 14-Aug-2006
|
||||
* Time: 15:50:48
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.LibraryOrderEntry;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.OrderEntry;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.ui.BooleanTableCellRenderer;
|
||||
import com.intellij.ui.OrderPanel;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Dead code now
|
||||
*/
|
||||
public class LibraryDependantsPanel extends OrderPanel<ModifiableRootModel> {
|
||||
private final Library myLibrary;
|
||||
|
||||
public LibraryDependantsPanel(final Library library) {
|
||||
super(ModifiableRootModel.class, true);
|
||||
myLibrary = library;
|
||||
getEntryTable().setDefaultRenderer(ModifiableRootModel.class, new DefaultTableCellRenderer(){
|
||||
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
|
||||
final Component cellRendererComponent = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
||||
if (value instanceof ModifiableRootModel){
|
||||
final ModifiableRootModel model = (ModifiableRootModel)value;
|
||||
final Module module = model.getModule();
|
||||
setText(module.getName());
|
||||
setIcon(module.getModuleType().getNodeIcon(false));
|
||||
}
|
||||
return cellRendererComponent;
|
||||
}
|
||||
});
|
||||
getEntryTable().setDefaultRenderer(Boolean.class, new BooleanTableCellRenderer());
|
||||
|
||||
setBorder(BorderFactory.createTitledBorder("Used In"));
|
||||
}
|
||||
|
||||
|
||||
public boolean isCheckable(final ModifiableRootModel entry) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isChecked(final ModifiableRootModel model) {
|
||||
final OrderEntry[] entries = model.getOrderEntries();
|
||||
for (OrderEntry entry : entries) {
|
||||
if (entry instanceof LibraryOrderEntry) {
|
||||
final LibraryOrderEntry libraryOrderEntry = (LibraryOrderEntry)entry;
|
||||
if (Comparing.equal(libraryOrderEntry.getLibrary(), myLibrary)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setChecked(final ModifiableRootModel model, final boolean checked) {
|
||||
if (checked) {
|
||||
model.addLibraryEntry(myLibrary);
|
||||
}
|
||||
else {
|
||||
final OrderEntry[] entries = model.getOrderEntries();
|
||||
for (OrderEntry entry : entries) {
|
||||
if (entry instanceof LibraryOrderEntry) {
|
||||
final LibraryOrderEntry libraryOrderEntry = (LibraryOrderEntry)entry;
|
||||
if (Comparing.equal(libraryOrderEntry.getLibrary(), myLibrary)) {
|
||||
model.removeOrderEntry(libraryOrderEntry);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: Dec 15, 2003
|
||||
*/
|
||||
public class ModuleCreationInfo {
|
||||
public String name;
|
||||
public String path;
|
||||
public String moduleType;
|
||||
}
|
||||
-77
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Anna.Kozlova
|
||||
* Date: 14-Aug-2006
|
||||
* Time: 15:31:35
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.ModuleOrderEntry;
|
||||
import com.intellij.openapi.roots.OrderEntry;
|
||||
import com.intellij.ui.OrderPanel;
|
||||
|
||||
/**
|
||||
* Dead code now
|
||||
*/
|
||||
public class ModuleDependantsPanel extends OrderPanel<ModifiableRootModel> {
|
||||
private final Module myModule;
|
||||
|
||||
public ModuleDependantsPanel(final Module module) {
|
||||
super(ModifiableRootModel.class, true);
|
||||
myModule = module;
|
||||
}
|
||||
|
||||
|
||||
public boolean isCheckable(final ModifiableRootModel entry) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isChecked(final ModifiableRootModel model) {
|
||||
final OrderEntry[] entries = model.getOrderEntries();
|
||||
for (OrderEntry entry : entries) {
|
||||
if (entry instanceof ModuleOrderEntry) {
|
||||
final ModuleOrderEntry moduleOrderEntry = (ModuleOrderEntry)entry;
|
||||
if (moduleOrderEntry.getModule() == myModule) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setChecked(final ModifiableRootModel model, final boolean checked) {
|
||||
if (checked) {
|
||||
model.addModuleOrderEntry(myModule);
|
||||
}
|
||||
else {
|
||||
final OrderEntry[] entries = model.getOrderEntries();
|
||||
for (OrderEntry entry : entries) {
|
||||
if (entry instanceof ModuleOrderEntry) {
|
||||
final ModuleOrderEntry moduleOrderEntry = (ModuleOrderEntry)entry;
|
||||
if (moduleOrderEntry.getModule() == myModule) {
|
||||
model.removeOrderEntry(moduleOrderEntry);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: Jul 22, 2004
|
||||
*/
|
||||
public class ModuleEditorState implements ProjectComponent, JDOMExternalizable{
|
||||
|
||||
public String LAST_EDITED_MODULE_NAME;
|
||||
public String LAST_EDITED_TAB_NAME;
|
||||
|
||||
public static ModuleEditorState getInstance(Project project) {
|
||||
return (ModuleEditorState)project.getComponent(ModuleEditorState.class);
|
||||
}
|
||||
|
||||
public void readExternal(Element element) throws InvalidDataException {
|
||||
DefaultJDOMExternalizer.readExternal(this, element);
|
||||
}
|
||||
|
||||
public void writeExternal(Element element) throws WriteExternalException {
|
||||
DefaultJDOMExternalizer.writeExternal(this, element);
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "ModuleEditorState";
|
||||
}
|
||||
|
||||
public void initComponent() { }
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
}
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration;
|
||||
|
||||
import com.intellij.ui.TableUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
/**
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: May 21, 2004
|
||||
*/
|
||||
class MoveTableRowButtonListener implements ActionListener {
|
||||
private final int myDelta;
|
||||
private final JTable myTable;
|
||||
private final Runnable myOnRowMoveAction;
|
||||
|
||||
public MoveTableRowButtonListener(int delta, JTable table, Runnable onRowMoveAction) {
|
||||
myDelta = delta;
|
||||
myTable = table;
|
||||
myOnRowMoveAction = onRowMoveAction;
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
final int moveCount = Math.abs(myDelta);
|
||||
for (int idx = 0; idx < moveCount; idx++) {
|
||||
if (myDelta < 0) {
|
||||
TableUtil.moveSelectedItemsUp(myTable);
|
||||
}
|
||||
else {
|
||||
TableUtil.moveSelectedItemsDown(myTable);
|
||||
}
|
||||
}
|
||||
/*
|
||||
final int selectedIndex = myTable.getSelectedRow();
|
||||
if (selectedIndex < 0) {
|
||||
return;
|
||||
}
|
||||
final DefaultTableModel tableModel = (DefaultTableModel)myTable.getModel();
|
||||
final int nextIndex = calcNextIndex(selectedIndex, tableModel.getRowCount(), myDelta);
|
||||
if (selectedIndex == nextIndex) {
|
||||
return;
|
||||
}
|
||||
tableModel.moveRow(selectedIndex, selectedIndex, nextIndex);
|
||||
myTable.getSelectionModel().setSelectionInterval(nextIndex, nextIndex);
|
||||
*/
|
||||
if (myOnRowMoveAction != null) {
|
||||
myOnRowMoveAction.run();
|
||||
}
|
||||
myTable.requestFocus();
|
||||
}
|
||||
}
|
||||
-10
@@ -15,10 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration.artifacts.nodes;
|
||||
|
||||
import com.intellij.packaging.artifacts.Artifact;
|
||||
import com.intellij.packaging.elements.ComplexPackagingElement;
|
||||
import com.intellij.packaging.elements.CompositePackagingElement;
|
||||
import com.intellij.packaging.impl.elements.ArtifactPackagingElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -48,14 +46,6 @@ public class PackagingNodeSource {
|
||||
return mySourceElement;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Artifact getSourceArtifact() {
|
||||
if (mySourceElement instanceof ArtifactPackagingElement) {
|
||||
return ((ArtifactPackagingElement)mySourceElement).findArtifact(mySourceParentNode.getContext());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public PackagingElementNode<?> getSourceParentNode() {
|
||||
return mySourceParentNode;
|
||||
|
||||
+4
-7
@@ -25,11 +25,13 @@ import com.intellij.packaging.artifacts.ArtifactType;
|
||||
import com.intellij.packaging.elements.PackagingElement;
|
||||
import com.intellij.packaging.elements.PackagingElementFactory;
|
||||
import com.intellij.packaging.ui.*;
|
||||
import com.intellij.ui.ColoredTreeCellRenderer;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
@@ -103,11 +105,6 @@ public class ModuleSourceItemGroup extends PackagingSourceItem {
|
||||
return myModule;
|
||||
}
|
||||
|
||||
public void render(@NotNull ColoredTreeCellRenderer renderer) {
|
||||
renderer.append(myModule.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
|
||||
renderer.setIcon(myModule.getModuleType().getNodeIcon(false));
|
||||
}
|
||||
|
||||
private static class ModuleSourceItemPresentation extends SourceItemPresentation {
|
||||
private final Module myModule;
|
||||
private final ArtifactEditorContext myContext;
|
||||
|
||||
-4
@@ -172,10 +172,6 @@ public class LibraryRootsComponent implements Disposable, LibraryEditorComponent
|
||||
Disposer.register(this, myTreeBuilder);
|
||||
}
|
||||
|
||||
public Tree getTree() {
|
||||
return myTree;
|
||||
}
|
||||
|
||||
public JComponent getComponent() {
|
||||
return myPanel;
|
||||
}
|
||||
|
||||
-8
@@ -50,12 +50,4 @@ class LibraryTableTreeBuilder extends AbstractTreeBuilder {
|
||||
protected ProgressIndicator createProgressIndicator() {
|
||||
return new StatusBarProgress();
|
||||
}
|
||||
|
||||
public void updateAndSelect(final LibraryTableTreeContentElement element) {
|
||||
updateFromRootCB().doWhenDone(new Runnable() {
|
||||
public void run() {
|
||||
select(element);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Anna.Kozlova
|
||||
* Date: 17-Aug-2006
|
||||
* Time: 14:13:02
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration.projectRoot;
|
||||
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.ui.NamedConfigurable;
|
||||
import com.intellij.openapi.ui.PanelWithText;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class GlobalResourcesConfigurable extends NamedConfigurable {
|
||||
public static final Icon ICON = IconLoader.getIcon("/modules/globalResources.png");
|
||||
|
||||
public void setDisplayName(final String name) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Object getEditableObject() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getBannerSlogan() {
|
||||
return ProjectBundle.message("project.roots.global.resources.display.name");
|
||||
}
|
||||
|
||||
public JComponent createOptionsPanel() {
|
||||
return new PanelWithText(ProjectBundle.message("project.roots.global.resources.description"));
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return ProjectBundle.message("project.roots.global.resources.display.name");
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return ICON;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NonNls
|
||||
public String getHelpTopic() {
|
||||
return "preferences.jdkGlobalLibs";
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void apply() throws ConfigurationException {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
public void disposeUIResources() {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration.projectRoot;
|
||||
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.util.ActionCallback;
|
||||
import com.intellij.ui.navigation.History;
|
||||
|
||||
public interface HistoryAware {
|
||||
|
||||
|
||||
interface Config {
|
||||
|
||||
void setHistoryFacade(Facade facade);
|
||||
|
||||
}
|
||||
|
||||
interface Facade {
|
||||
|
||||
boolean isHistoryNavigatedNow();
|
||||
|
||||
History getHistory();
|
||||
|
||||
ActionCallback select(Configurable configurable);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-5
@@ -63,11 +63,6 @@ public class LibrariesContainerFactory {
|
||||
return new LibrariesContainerImpl(module.getProject(), module, rootModel);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static LibrariesContainer createContainer() {
|
||||
return new LibrariesContainerImpl(null, null, null);
|
||||
}
|
||||
|
||||
public static LibrariesContainer createContainer(StructureConfigurableContext context) {
|
||||
return new StructureConfigurableLibrariesContainer(context);
|
||||
}
|
||||
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Anna.Kozlova
|
||||
* Date: 17-Aug-2006
|
||||
* Time: 14:10:54
|
||||
*/
|
||||
package com.intellij.openapi.roots.ui.configuration.projectRoot;
|
||||
|
||||
import com.intellij.openapi.module.ModuleManager;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
import com.intellij.openapi.ui.NamedConfigurable;
|
||||
import com.intellij.openapi.ui.PanelWithText;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class ModulesConfigurable extends NamedConfigurable<ModuleManager> {
|
||||
private static final Icon PROJECT_ICON = IconLoader.getIcon("/modules/modulesNode.png");
|
||||
|
||||
private final ModuleManager myManager;
|
||||
|
||||
public ModulesConfigurable(ModuleManager manager) {
|
||||
myManager = manager;
|
||||
}
|
||||
|
||||
public void setDisplayName(final String name) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
public ModuleManager getEditableObject() {
|
||||
return myManager;
|
||||
}
|
||||
|
||||
public String getBannerSlogan() {
|
||||
return ProjectBundle.message("project.roots.modules.display.name");
|
||||
}
|
||||
|
||||
public JComponent createOptionsPanel() {
|
||||
return new PanelWithText(ProjectBundle.message("project.roots.modules.description"));
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return ProjectBundle.message("project.roots.modules.display.name");
|
||||
}
|
||||
|
||||
public Icon getIcon() {
|
||||
return PROJECT_ICON;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NonNls
|
||||
public String getHelpTopic() {
|
||||
return "project.structureModulesPage";
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void apply() throws ConfigurationException {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
public void disposeUIResources() {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
-4
@@ -43,10 +43,6 @@ public class UsageInModuleClasspath extends ProjectStructureElementUsage {
|
||||
return myModule.getName();
|
||||
}
|
||||
|
||||
public String getModuleName() {
|
||||
return myModule.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void navigate() {
|
||||
ModulesConfigurator modulesConfigurator = myContext.getModulesConfigurator();
|
||||
|
||||
@@ -41,11 +41,6 @@ public class ConfigFileInfoSetImpl implements ConfigFileInfoSet {
|
||||
private @Nullable ConfigFileContainerImpl myContainer;
|
||||
private final ConfigFileMetaDataProvider myMetaDataProvider;
|
||||
|
||||
public ConfigFileInfoSetImpl(final @NotNull ConfigFileContainerImpl container) {
|
||||
myContainer = container;
|
||||
myMetaDataProvider = container.getMetaDataProvider();
|
||||
}
|
||||
|
||||
public ConfigFileInfoSetImpl(final ConfigFileMetaDataProvider metaDataProvider) {
|
||||
myMetaDataProvider = metaDataProvider;
|
||||
}
|
||||
@@ -84,12 +79,6 @@ public class ConfigFileInfoSetImpl implements ConfigFileInfoSet {
|
||||
onChange();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<ConfigFileInfo> getDescriptors(ConfigFileMetaData metaData) {
|
||||
final Collection<ConfigFileInfo> collection = myConfigFiles.get(metaData);
|
||||
return collection != null ? Collections.unmodifiableCollection(collection) : Collections.<ConfigFileInfo>emptyList();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ConfigFileInfo getConfigFileInfo(ConfigFileMetaData metaData) {
|
||||
final Collection<ConfigFileInfo> descriptors = myConfigFiles.get(metaData);
|
||||
|
||||
@@ -36,19 +36,11 @@ public class HyperlinksToClassesOption extends PrintOption {
|
||||
private JCheckBox myCbGenerateHyperlinksToClasses;
|
||||
private boolean isGenerateHyperlinksToClasses = false;
|
||||
|
||||
public boolean isGenerateHyperlinksToClasses() {
|
||||
return isGenerateHyperlinksToClasses;
|
||||
}
|
||||
|
||||
public void setGenerateHyperlinksToClasses(boolean generateHyperlinksToClasses) {
|
||||
isGenerateHyperlinksToClasses = generateHyperlinksToClasses;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public TreeMap<Integer, PsiReference> collectReferences(PsiFile psiFile, Map<PsiFile, PsiFile> filesMap) {
|
||||
if (isGenerateHyperlinksToClasses()) {
|
||||
if (isGenerateHyperlinksToClasses) {
|
||||
FileType fileType = psiFile.getFileType();
|
||||
if(StdFileTypes.JAVA == fileType || StdFileTypes.JSP == fileType) {
|
||||
if (StdFileTypes.JAVA == fileType || StdFileTypes.JSP == fileType) {
|
||||
final TreeMap<Integer, PsiReference> refMap = new TreeMap<Integer, PsiReference>();
|
||||
findClassReferences(psiFile, refMap, filesMap, psiFile);
|
||||
return refMap;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 820 B |
@@ -32,7 +32,6 @@ import com.intellij.openapi.editor.impl.softwrap.SoftWrapAppliancePlaces;
|
||||
import com.intellij.openapi.fileEditor.FileEditor;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.TextEditor;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.options.SearchableConfigurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -422,10 +421,6 @@ public class EditorOptionsPanel {
|
||||
return myBehaviourPanel;
|
||||
}
|
||||
|
||||
public Configurable getConfigurable() {
|
||||
return myConfigurable;
|
||||
}
|
||||
|
||||
public class MyConfigurable implements SearchableConfigurable {
|
||||
@NotNull
|
||||
public String getId() {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.codeInsight.completion.impl;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
class SwapComparator<V> implements Comparator<V> {
|
||||
private final Comparator<V> myComparator;
|
||||
|
||||
public SwapComparator(final Comparator<V> comparator) {
|
||||
myComparator = comparator;
|
||||
}
|
||||
|
||||
public int compare(final V o1, final V o2) {
|
||||
return myComparator.compare(o2, o1);
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.intellij.facet.impl.ui.libraries;
|
||||
|
||||
import com.intellij.facet.ui.libraries.LibraryDownloadInfo;
|
||||
import com.intellij.facet.ui.libraries.LibraryInfo;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.application.Result;
|
||||
@@ -304,15 +303,4 @@ public class LibraryDownloader {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static LibraryDownloadInfo[] getDownloadingInfos(final LibraryInfo[] libraries) {
|
||||
List<LibraryDownloadInfo> downloadInfos = new ArrayList<LibraryDownloadInfo>();
|
||||
for (LibraryInfo library : libraries) {
|
||||
LibraryDownloadInfo downloadInfo = library.getDownloadingInfo();
|
||||
if (downloadInfo != null) {
|
||||
downloadInfos.add(downloadInfo);
|
||||
}
|
||||
}
|
||||
return downloadInfos.toArray(new LibraryDownloadInfo[downloadInfos.size()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,6 @@ class UrlUtil {
|
||||
private static final String URL_PATH_SEPARATOR = "/";
|
||||
private static final String FILE_PROTOCOL = "file";
|
||||
private static final String FILE_PROTOCOL_PREFIX = FILE_PROTOCOL + ":";
|
||||
private static final String JAR_PROTOCOL = "jar";
|
||||
private static final String JAR_PROTOCOL_PREFIX = JAR_PROTOCOL + ":";
|
||||
|
||||
public static String loadText(URL url) throws IOException {
|
||||
final InputStream stream = new BufferedInputStream(URLUtil.openStream(url));
|
||||
|
||||
@@ -58,16 +58,6 @@ public class OrderEntryUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void detachModuleLibrary(@NotNull ModifiableRootModel model, @Nullable OrderEntry entry) {
|
||||
if (entry == null) {
|
||||
model.dispose();
|
||||
}
|
||||
else {
|
||||
model.removeOrderEntry(entry);
|
||||
model.commit();
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static ModuleOrderEntry findModuleOrderEntry(@NotNull ModuleRootModel model, @Nullable Module module) {
|
||||
if (module == null) return null;
|
||||
|
||||
@@ -18,16 +18,13 @@ package com.intellij.openapi.roots.impl;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.pointers.VirtualFilePointer;
|
||||
import com.intellij.openapi.vfs.pointers.VirtualFilePointerContainer;
|
||||
import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
|
||||
import com.intellij.util.containers.StripedLockConcurrentHashMap;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
@@ -68,17 +65,6 @@ public class OrderRootsCache {
|
||||
myRoots.clear();
|
||||
}
|
||||
|
||||
public static Set<VirtualFile> convertPointersToFiles(Set<VirtualFilePointer> cachedFiles) {
|
||||
final LinkedHashSet<VirtualFile> result = new LinkedHashSet<VirtualFile>();
|
||||
for (VirtualFilePointer cachedFile : cachedFiles) {
|
||||
final VirtualFile virtualFile = cachedFile.getFile();
|
||||
if (virtualFile != null) {
|
||||
result.add(virtualFile);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static final class CacheKey {
|
||||
private final OrderRootType myRootType;
|
||||
private int myFlags;
|
||||
|
||||
@@ -677,9 +677,6 @@ title.directory.does.not.exist=Directory Does Not Exist
|
||||
error.failed.to.create.directory=Failed to create directory \"{0}\"
|
||||
label.select.compiler.output.path=Select c&ompiler output path:
|
||||
title.select.compiler.output.path=Select compiler output path
|
||||
prompt.single.or.multi.module.project=A functional {0} project must have at least one module. In most cases, one module would be quite enough.\nTo quickly create a single-module project and start working right away, select the \"Create single-module project\" option.\nFor creating a more complex project, with multiple modules, use the \"Create/configure multi-module project\" option.
|
||||
radio.create.&single.module.project=Create single-module project
|
||||
radio.create.configure.&multi.module.project=Create/configure multi-module project
|
||||
label.project.name=N&ame:
|
||||
label.component.file.location={0} file &location:
|
||||
label.project.files.location=Project files &location:
|
||||
|
||||
@@ -352,16 +352,12 @@ project.roots.module.jdk.problem.message=Module SDK is not defined.
|
||||
project.roots.module.duplicate.name.message=Duplicate module name
|
||||
project.roots.library.problem.message=Classpath entry is invalid: {0}
|
||||
project.roots.project.display.name=Project
|
||||
project.roots.global.resources.display.name=Global Resources
|
||||
project.roots.modules.display.name=Modules
|
||||
sdk.configuration.exception=SDK ''{0}'' is invalid.
|
||||
project.roots.project.jdk.inherited=Project SDK
|
||||
add.new.header.text=New
|
||||
add.new.module.text.full=Module
|
||||
project.roots.replace.library.entry.message=Do you really want to replace old library ''{0}''
|
||||
project.roots.replace.library.entry.title=Library already added
|
||||
project.roots.global.resources.description=Global resources are referenced through the entire project and can be used from all modules within it.<br><br>They are as well available to all other projects created on the local computer.<br><br>Global resources include the Global Libraries (sets of classes that add up various functionality to your applications) and JDKs (packages required for writing, debugging and compiling the Java code).
|
||||
project.roots.modules.description=Module represents the set of files, logically grouped to help organize various parts of your projects.<br><br>Each module hosts all the required files: source code, resources and optional descriptors that might be necessary to compile and deploy your application.
|
||||
project.roots.classpath.format.label=Dependencies storage format:
|
||||
project.roots.classpath.format.default.descr=IntelliJ IDEA (.iml)
|
||||
external.annotations.root.chooser.title=Select external annotations root for {0}
|
||||
|
||||
-4
@@ -302,10 +302,6 @@ public abstract class AbstractValueHint {
|
||||
}
|
||||
}
|
||||
|
||||
protected Point getPoint() {
|
||||
return myPoint;
|
||||
}
|
||||
|
||||
protected TextRange getCurrentRange() {
|
||||
return myCurrentRange;
|
||||
}
|
||||
|
||||
@@ -69,8 +69,10 @@ public class XValueMarkers<V extends XValue, M> {
|
||||
|
||||
public void unmarkValue(@NotNull XValue value) {
|
||||
//noinspection unchecked
|
||||
M m = myProvider.getMarker((V)value);
|
||||
final V v = (V)value;
|
||||
M m = myProvider.getMarker(v);
|
||||
if (m != null) {
|
||||
myProvider.unmarkValue(v, m);
|
||||
myMarkers.remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,10 +30,6 @@ public class ValueMarkup {
|
||||
@Nullable
|
||||
private final String myToolTipText;
|
||||
|
||||
public ValueMarkup(final String text, final Color color) {
|
||||
this(text, color, null);
|
||||
}
|
||||
|
||||
public ValueMarkup(final String text, final Color color, @Nullable String toolTipText) {
|
||||
myText = text;
|
||||
myColor = color;
|
||||
|
||||
-9
@@ -113,10 +113,6 @@ public class XDebuggerTreeState {
|
||||
return myExpanded;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return myName;
|
||||
}
|
||||
|
||||
public boolean isSelected() {
|
||||
return mySelected;
|
||||
}
|
||||
@@ -125,11 +121,6 @@ public class XDebuggerTreeState {
|
||||
return myValue;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public NodeInfo getChild(@NotNull String name) {
|
||||
return myChidlren != null ? myChidlren.get(name) : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public NodeInfo removeChild(@NotNull String name) {
|
||||
return myChidlren != null ? myChidlren.remove(name) : null;
|
||||
|
||||
@@ -77,7 +77,6 @@ error.annotation.processing.not.supported.for.module.cycles=Annotation processor
|
||||
warning.sources.under.output.paths=Compiler option \"Clear output directory on rebuild\" is currently on.\nHowever, source files may exist in the following output paths:\n{0}\nCompilation will proceed without clearing output directories.
|
||||
action.compiler.properties.text=Compiler Properties
|
||||
actions.exclude.from.compile.text=Exclude from Compile
|
||||
error.saving.data.to.file=Error storing data to {0}:\n{1}
|
||||
progress.deleting.temp.files=Deleting temp files...
|
||||
progress.checking.dependencies=Checking dependencies...
|
||||
progress.found.dependent.files=Found {0} dependent files
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
<components>
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.roots.ui.configuration.ModuleEditorState</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
</component>
|
||||
|
||||
<!--
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.roots.ui.configuration.ProjectLibrariesConfigurable</implementation-class>
|
||||
|
||||
Reference in New Issue
Block a user