mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
obsolete code
This commit is contained in:
@@ -23,7 +23,6 @@ import com.intellij.pom.PomModelAspect;
|
||||
import com.intellij.pom.event.PomModelEvent;
|
||||
import com.intellij.pom.java.LanguageLevel;
|
||||
import com.intellij.pom.java.PomJavaAspect;
|
||||
import com.intellij.pom.java.events.JavaTreeChanged;
|
||||
import com.intellij.pom.java.events.PomJavaAspectChangeSet;
|
||||
import com.intellij.pom.tree.TreeAspect;
|
||||
import com.intellij.pom.tree.events.TreeChangeEvent;
|
||||
@@ -69,7 +68,6 @@ public class PomJavaAspectImpl extends PomJavaAspect implements ProjectComponent
|
||||
final PsiFile containingFile = changeSet.getRootElement().getPsi().getContainingFile();
|
||||
if(!(containingFile.getLanguage() instanceof JavaLanguage)) return;
|
||||
final PomJavaAspectChangeSet set = new PomJavaAspectChangeSet(myPomModel);
|
||||
set.addChange(new JavaTreeChanged(containingFile));
|
||||
event.registerChangeSet(this, set);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +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.pom.java.events;
|
||||
|
||||
import com.intellij.psi.PsiFile;
|
||||
|
||||
public class JavaTreeChanged implements PomJavaChange {
|
||||
private final PsiFile myFile;
|
||||
|
||||
public JavaTreeChanged(final PsiFile file) {
|
||||
myFile = file;
|
||||
}
|
||||
|
||||
public PsiFile getFile() {
|
||||
return myFile;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,30 +22,18 @@ import com.intellij.pom.event.PomChangeSet;
|
||||
import com.intellij.pom.java.PomJavaAspect;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PomJavaAspectChangeSet implements PomChangeSet{
|
||||
private final PomModel myModel;
|
||||
private final List<PomJavaChange> myChanges = new ArrayList<PomJavaChange>();
|
||||
|
||||
|
||||
public PomJavaAspectChangeSet(PomModel model) {
|
||||
myModel = model;
|
||||
}
|
||||
|
||||
public void addChange(PomJavaChange change) {
|
||||
myChanges.add(change);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public PomModelAspect getAspect() {
|
||||
return myModel.getModelAspect(PomJavaAspect.class);
|
||||
}
|
||||
|
||||
public void merge(@NotNull PomChangeSet blocked) {
|
||||
if(!(blocked instanceof PomJavaAspectChangeSet)) return;
|
||||
final PomJavaAspectChangeSet blockedJavaChange = (PomJavaAspectChangeSet)blocked;
|
||||
myChanges.addAll(blockedJavaChange.myChanges);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,14 +15,8 @@
|
||||
*/
|
||||
package com.intellij.pom.xml.impl.events;
|
||||
|
||||
import com.intellij.pom.PomModel;
|
||||
import com.intellij.pom.event.PomModelEvent;
|
||||
import com.intellij.pom.xml.XmlAspect;
|
||||
import com.intellij.pom.xml.XmlChangeVisitor;
|
||||
import com.intellij.pom.xml.events.XmlTagChildAdd;
|
||||
import com.intellij.pom.xml.impl.XmlAspectChangeSetImpl;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.xml.XmlFile;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.psi.xml.XmlTagChild;
|
||||
|
||||
@@ -42,14 +36,6 @@ public class XmlTagChildAddImpl implements XmlTagChildAdd {
|
||||
return myChild;
|
||||
}
|
||||
|
||||
public static PomModelEvent createXmlTagChildAdd(PomModel source, XmlTag context, XmlTagChild treeElement) {
|
||||
final PomModelEvent event = new PomModelEvent(source);
|
||||
final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(source, PsiTreeUtil.getParentOfType(context, XmlFile.class));
|
||||
xmlAspectChangeSet.add(new XmlTagChildAddImpl(context, treeElement));
|
||||
event.registerChangeSet(source.getModelAspect(XmlAspect.class), xmlAspectChangeSet);
|
||||
return event;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public String toString() {
|
||||
return "child added to " + getTag().getName() + " child: " + myChild.toString();
|
||||
|
||||
@@ -15,17 +15,8 @@
|
||||
*/
|
||||
package com.intellij.pom.xml.impl.events;
|
||||
|
||||
import com.intellij.pom.PomModel;
|
||||
import com.intellij.pom.event.PomModelEvent;
|
||||
import com.intellij.pom.xml.XmlAspect;
|
||||
import com.intellij.pom.xml.XmlChangeVisitor;
|
||||
import com.intellij.pom.xml.events.XmlChange;
|
||||
import com.intellij.pom.xml.events.XmlTagChildRemoved;
|
||||
import com.intellij.pom.xml.impl.XmlAspectChangeSetImpl;
|
||||
import com.intellij.pom.xml.XmlChangeVisitor;
|
||||
import com.intellij.pom.xml.impl.XmlAspectChangeSetImpl;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.xml.XmlFile;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.psi.xml.XmlTagChild;
|
||||
|
||||
@@ -45,13 +36,6 @@ public class XmlTagChildRemovedImpl implements XmlTagChildRemoved {
|
||||
return myChild;
|
||||
}
|
||||
|
||||
public static PomModelEvent createXmlTagChildRemoved(PomModel source, XmlTag context, XmlTagChild treeElement) {
|
||||
final PomModelEvent event = new PomModelEvent(source);
|
||||
final XmlAspectChangeSetImpl xmlAspectChangeSet = new XmlAspectChangeSetImpl(source, PsiTreeUtil.getParentOfType(context, XmlFile.class));
|
||||
xmlAspectChangeSet.add(new XmlTagChildRemovedImpl(context, treeElement));
|
||||
event.registerChangeSet(source.getModelAspect(XmlAspect.class), xmlAspectChangeSet);
|
||||
return event;
|
||||
}
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public String toString() {
|
||||
return "child removed from " + getTag().getName() + " child: " + myChild.toString();
|
||||
|
||||
Reference in New Issue
Block a user