API changes in #876

======
Comparing openapi-873.jar and openapi-876.jar
added: com.intellij.openapi.localVcs.LocalVcs (abstract class)
added: com.intellij.openapi.localVcs.LocalVcsItemsLocker (interface)
added: com.intellij.openapi.localVcs.LocalVcsPurgingProvider (interface)
added: com.intellij.openapi.localVcs.LvcsAction (interface)
added: com.intellij.openapi.localVcs.LvcsComparator (class)
added: com.intellij.openapi.localVcs.LvcsDirectory (interface)
added: com.intellij.openapi.localVcs.LvcsDirectoryRevision (interface)
added: com.intellij.openapi.localVcs.LvcsFile (interface)
added: com.intellij.openapi.localVcs.LvcsFileRevision (interface)
added: com.intellij.openapi.localVcs.LvcsLabel (interface)
added: com.intellij.openapi.localVcs.LvcsObject (interface)
added: com.intellij.openapi.localVcs.LvcsRevision (interface)
---
com.intellij.openapi.editor.Document (interface)
method added: com.intellij.openapi.editor.RangeMarker createRangeMarker(int arg1, int arg2, boolean arg3)
---
com.intellij.openapi.projectRoots.ProjectRootManager (abstract class)
method removed: public abstract void removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListener arg1)
method added: public abstract void removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListener arg1)
---
com.intellij.openapi.vcs.AbstractVcsHelper (abstract class)
method removed: public abstract com.intellij.localVcs.LvcsAction startVcsAction(String arg1)
method removed: public abstract void finishVcsAction(com.intellij.localVcs.LvcsAction arg1)
method added: public abstract com.intellij.openapi.localVcs.LvcsAction startVcsAction(String arg1)
method added: public abstract void finishVcsAction(com.intellij.openapi.localVcs.LvcsAction arg1)
======
Comparing idea-873.jar and idea-876.jar
removed: com.intellij.aspects.rt.util.RepositoryEx (class)
removed: com.intellij.cvsSupport2.cvshandlers.ApplyChanges (abstract class)
removed: com.intellij.cvsSupport2.vfslistener.CvsUpToDateStatusProvider (class)
removed: com.intellij.localVcs.LvcsAction (class)
added: com.intellij.cvsSupport2.cvsoperations.CvsExecutionEnvironment (class)
added: com.intellij.cvsSupport2.cvsstatuses.CvsUpToDateRevisionProvider (class)
added: com.intellij.cvsSupport2.util.CvsVfsUtil (class)
added: com.intellij.localVcs.fileContent.VirtualFileInfo (interface)
added: com.intellij.localVcs.impl.RepositoryItem (class)
added: com.intellij.openapi.localVcs.LocalVcs (abstract class)
added: com.intellij.openapi.localVcs.LocalVcsItemsLocker (interface)
added: com.intellij.openapi.localVcs.LocalVcsPurgingProvider (interface)
added: com.intellij.openapi.localVcs.LvcsAction (interface)
added: com.intellij.openapi.localVcs.LvcsComparator (class)
added: com.intellij.openapi.localVcs.LvcsDirectory (interface)
added: com.intellij.openapi.localVcs.LvcsDirectoryRevision (interface)
added: com.intellij.openapi.localVcs.LvcsFile (interface)
added: com.intellij.openapi.localVcs.LvcsFileRevision (interface)
added: com.intellij.openapi.localVcs.LvcsLabel (interface)
added: com.intellij.openapi.localVcs.LvcsObject (interface)
added: com.intellij.openapi.localVcs.LvcsRevision (interface)
added: com.intellij.testFramework.EditorActionTestCase (abstract class)
added: com.intellij.testFramework.LightCodeInsightTestCase (class)
added: com.intellij.testFramework.LightIdeaTestCase (class)
added: com.intellij.util.BcelUtils (class)
---
com.intellij.aspects.rt.pattern.RegexpTypePattern (class)
constructor removed: public (String arg1, com.intellij.aspects.b.h arg2, boolean arg3)
constructor added: public (String arg1, com.intellij.aspects.a.h arg2, boolean arg3)
---
com.intellij.cvsSupport2.CvsFileRevision (class)
constructor removed: public (b.a.a.a.g.i.d arg1, com.intellij.openapi.vfs.VirtualFile arg2, b.a.a.a.g.i.c arg3)
constructor added: public (a.a.a.a.d.f.d arg1, com.intellij.openapi.vfs.VirtualFile arg2, a.a.a.a.d.f.c arg3)
---
com.intellij.cvsSupport2.checkinProject.CvsAddFile (class)
constructor removed: public (String arg1, b.a.a.a.g.bk arg2)
constructor added: public (String arg1, a.a.a.a.d.bk arg2)
---
com.intellij.cvsSupport2.cvshandlers.Checkin (class)
constructor removed: public (com.intellij.openapi.vcs.b.a.g[] arg1, com.intellij.openapi.project.Project arg2, com.intellij.cvsSupport2.CvsVcs2 arg3, String arg4)
constructor added: public (com.intellij.openapi.vcs.a.a.g[] arg1, com.intellij.cvsSupport2.CvsVcs2 arg2, String arg3)
throws com.intellij.openapi.vcs.VcsException
---
com.intellij.cvsSupport2.cvshandlers.CvsHandler (abstract class)
field removed: protected com.intellij.cvsSupport2.cvshandlers.ErrorMessagesProcessor d
field removed: protected com.intellij.cvsSupport2.cvsmessages.CvsListenerWithProgress i
field removed: protected final java.util.List c
field removed: public static com.intellij.cvsSupport2.cvshandlers.CvsHandler a
constant removed: public int b = -1
field added: protected com.intellij.cvsSupport2.cvshandlers.ErrorMessagesProcessor e
field added: protected com.intellij.cvsSupport2.cvsmessages.CvsListenerWithProgress j
field added: protected final java.util.List d
field added: public static com.intellij.cvsSupport2.cvshandlers.CvsHandler b
constant added: public int c = -1
---
com.intellij.cvsSupport2.cvsmessages.CvsListenerWithProgress (class)
constructor removed: public (com.intellij.progress.b arg1, com.intellij.progress.c arg2)
constructor added: public (com.intellij.progress.b arg1)
---
com.intellij.cvsSupport2.cvsmessages.FileMessage (class)
constructor removed: public (b.a.a.a.g.c.c arg1)
constructor added: public (a.a.a.a.d.g.c arg1)
---
com.intellij.cvsSupport2.cvsoperations.AddFilesOperation (class)
constructor removed: public (b.a.a.a.g.bk arg1)
constructor added: public (a.a.a.a.d.bk arg1)
---
com.intellij.cvsSupport2.cvsoperations.CheckoutProjectOperation (class)
constructor removed: public (com.intellij.cvsSupport2.CvsEnvironment arg1, String arg2, java.io.File arg3, b.a.a.a.j.l arg4)
constructor added: public (com.intellij.cvsSupport2.CvsEnvironment arg1, String arg2, java.io.File arg3, a.a.a.a.j.l arg4)
---
com.intellij.cvsSupport2.cvsoperations.CvsCommandOperation (abstract class)
field removed: protected final b.a.a.a.j.l d
field removed: protected final b.a.a.a.j.m e
constructor removed: public (b.a.a.a.j.l arg1)
constructor removed: public (b.a.a.a.j.l arg1, b.a.a.a.j.m arg2)
constructor removed: public (b.a.a.a.j.m arg1)
field added: protected final a.a.a.a.j.l d
field added: protected final a.a.a.a.j.m e
constructor added: public (a.a.a.a.j.l arg1)
constructor added: public (a.a.a.a.j.l arg1, a.a.a.a.j.m arg2)
constructor added: public (a.a.a.a.j.m arg1)
---
com.intellij.cvsSupport2.cvsoperations.CvsOperationOnFiles (abstract class)
constructor removed: public (b.a.a.a.j.l arg1)
constructor added: public (a.a.a.a.j.l arg1)
---
com.intellij.cvsSupport2.cvsoperations.LocalPathIndifferentOperation (abstract class)
constructor removed: public (b.a.a.a.j.l arg1, b.a.a.a.j.m arg2, com.intellij.cvsSupport2.CvsEnvironment arg3)
constructor added: public (a.a.a.a.j.l arg1, a.a.a.a.j.m arg2, com.intellij.cvsSupport2.CvsEnvironment arg3)
---
com.intellij.cvsSupport2.cvsstatuses.CvsStatusProvider (class)
constant removed: public int b = 3000
---
com.intellij.cvsSupport2.ui.CvsConfigurationListEditor (class)
method removed: protected void doOKAction()
---
com.intellij.cvsSupport2.ui.FileHistoryDialog (class)
constructor removed: public (b.a.a.a.g.i.c arg1, com.intellij.openapi.vfs.VirtualFile arg2, com.intellij.openapi.project.Project arg3)
constructor added: public (a.a.a.a.d.f.c arg1, com.intellij.openapi.vfs.VirtualFile arg2, com.intellij.openapi.project.Project arg3)
---
com.intellij.cvsSupport2.ui.SelectFileToOpenAsProjectDialod (class)
method added: public javax.swing.JComponent getPreferredFocusedComponent()
---
com.intellij.cvsSupport2.updateinfo.FileTreeNode (class)
constructor removed: public (String arg1, com.intellij.ui.dl arg2, com.intellij.openapi.project.Project arg3)
constructor added: public (String arg1, com.intellij.ui.dp arg2, com.intellij.openapi.project.Project arg3)
---
com.intellij.debugger.DebugProcess (interface)
constructor added: public (com.intellij.debugger.r arg1)
---
com.intellij.openapi.editor.Document (interface)
method added: com.intellij.openapi.editor.RangeMarker createRangeMarker(int arg1, int arg2, boolean arg3)
---
com.intellij.openapi.projectRoots.ProjectRootManager (abstract class)
method removed: public abstract void removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListener arg1)
method added: public abstract void removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListener arg1)
---
com.intellij.openapi.vcs.AbstractVcsHelper (abstract class)
method removed: public abstract com.intellij.localVcs.LvcsAction startVcsAction(String arg1)
method removed: public abstract void finishVcsAction(com.intellij.localVcs.LvcsAction arg1)
method added: public abstract com.intellij.openapi.localVcs.LvcsAction startVcsAction(String arg1)
method added: public abstract void finishVcsAction(com.intellij.openapi.localVcs.LvcsAction arg1)
---
com.intellij.psi.PsiAspectManager (interface)
method added: boolean isAspectsEnabled()
---
com.intellij.psi.PsiPrimitiveType (class)
method removed: public String toString()
---
com.intellij.psi.PsiTreeChangeEvent (abstract class)
constant removed: public String PROP_DIRECTORY_NAME = "packageName"
constant removed: public String PROP_EXCLUDE_ROOTS = "excludeRoots"
constant removed: public String PROP_PROJECT_ROOTS = "projectRoots"
constant added: public String PROP_DIRECTORY_NAME = "directoryName"
---
com.intellij.psi.util.MethodSignature (class)
method added: public static com.intellij.psi.PsiSubstitutor unifyTypeParametersInSignatures(com.intellij.psi.util.MethodSignature arg0, com.intellij.psi.util.MethodSignature arg1, com.intellij.psi.PsiSubstitutor arg2, com.intellij.psi.PsiSubstitutor arg3)
---
com.intellij.psi.util.PsiUtil (class)
method removed: public static boolean isInheritor(com.intellij.psi.PsiClass arg0, com.intellij.psi.PsiClass arg1, boolean arg2, boolean arg3)
constant removed: public com.intellij.util.g.n METHOD_SIGNATURE_HASHCODE
method removed: public static java.util.Map getAllMethods(com.intellij.psi.PsiClass arg0) [Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Lcom/intellij/psi/PsiMethod;Ljava/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]
method added: public static boolean areErasureEqual(com.intellij.psi.PsiMethod arg0, com.intellij.psi.PsiMethod arg1)
method added: public static boolean hasErrorElementChild(com.intellij.psi.PsiElement arg0)
method added: public static com.intellij.psi.PsiClass getErasure(com.intellij.psi.PsiClass arg0)
method added: public static com.intellij.psi.PsiMethod[] findMethodsByName(com.intellij.psi.PsiClass arg0, String arg1, boolean arg2)
constant added: public com.intellij.util.d.n METHOD_SIGNATURE_HASHCODE [Signature(Lcom/intellij/util/containers/HashCode<Ljava/lang/Object;>;)]
method added: public static java.util.Map getSameErasureMethods(com.intellij.psi.PsiClass arg0) [Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Ljava/lang/Object;Ljava/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]
method added: public static java.util.Map getSameNameMethods(com.intellij.psi.PsiClass arg0) [Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Ljava/lang/Object;Ljava/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]
method added: public static java.util.Map getSameSignatureMethods(com.intellij.psi.PsiClass arg0) [Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Ljava/lang/Object;Ljava/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]
---
com.intellij.psi.util.PsiUtil$MethodSignatureEquality (class)
constructor removed: public ()
---
com.intellij.ui.TabbedPaneWrapper$TabbedPane (class)
constructor removed: public (com.intellij.ui.ds arg1, int arg2)
constructor added: public (com.intellij.ui.dv arg1, int arg2)

15 comments
Comment actions Permalink

BTW Timur, Thanks for publishing these.
Very helpful.

Jacques

0
Comment actions Permalink

Maxim,
That tool does produce this great comparing report? ;)
Is it LocalVCS hidden magic button? :)

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Timur Zambalayev" <no_mail@jetbrains.com> wrote in message
news:32671016.1059495156716.JavaMail.itn@is.intellij.net...

======
Comparing openapi-873.jar and openapi-876.jar
added: com.intellij.openapi.localVcs.LocalVcs (abstract class)
added: com.intellij.openapi.localVcs.LocalVcsItemsLocker (interface)
added: com.intellij.openapi.localVcs.LocalVcsPurgingProvider (interface)
added: com.intellij.openapi.localVcs.LvcsAction (interface)
added: com.intellij.openapi.localVcs.LvcsComparator (class)
added: com.intellij.openapi.localVcs.LvcsDirectory (interface)
added: com.intellij.openapi.localVcs.LvcsDirectoryRevision (interface)
added: com.intellij.openapi.localVcs.LvcsFile (interface)
added: com.intellij.openapi.localVcs.LvcsFileRevision (interface)
added: com.intellij.openapi.localVcs.LvcsLabel (interface)
added: com.intellij.openapi.localVcs.LvcsObject (interface)
added: com.intellij.openapi.localVcs.LvcsRevision (interface)
---
com.intellij.openapi.editor.Document (interface)
method added: com.intellij.openapi.editor.RangeMarker

createRangeMarker(int arg1, int arg2, boolean arg3)

---
com.intellij.openapi.projectRoots.ProjectRootManager (abstract class)
method removed: public abstract void

removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListe
ner arg1)

method added: public abstract void

removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListe
ner arg1)

---
com.intellij.openapi.vcs.AbstractVcsHelper (abstract class)
method removed: public abstract com.intellij.localVcs.LvcsAction

startVcsAction(String arg1)

method removed: public abstract void

finishVcsAction(com.intellij.localVcs.LvcsAction arg1)

method added: public abstract com.intellij.openapi.localVcs.LvcsAction

startVcsAction(String arg1)

method added: public abstract void

finishVcsAction(com.intellij.openapi.localVcs.LvcsAction arg1)

======
Comparing idea-873.jar and idea-876.jar
removed: com.intellij.aspects.rt.util.RepositoryEx (class)
removed: com.intellij.cvsSupport2.cvshandlers.ApplyChanges (abstract

class)

removed: com.intellij.cvsSupport2.vfslistener.CvsUpToDateStatusProvider

(class)

removed: com.intellij.localVcs.LvcsAction (class)
added: com.intellij.cvsSupport2.cvsoperations.CvsExecutionEnvironment

(class)

added: com.intellij.cvsSupport2.cvsstatuses.CvsUpToDateRevisionProvider

(class)

added: com.intellij.cvsSupport2.util.CvsVfsUtil (class)
added: com.intellij.localVcs.fileContent.VirtualFileInfo (interface)
added: com.intellij.localVcs.impl.RepositoryItem (class)
added: com.intellij.openapi.localVcs.LocalVcs (abstract class)
added: com.intellij.openapi.localVcs.LocalVcsItemsLocker (interface)
added: com.intellij.openapi.localVcs.LocalVcsPurgingProvider (interface)
added: com.intellij.openapi.localVcs.LvcsAction (interface)
added: com.intellij.openapi.localVcs.LvcsComparator (class)
added: com.intellij.openapi.localVcs.LvcsDirectory (interface)
added: com.intellij.openapi.localVcs.LvcsDirectoryRevision (interface)
added: com.intellij.openapi.localVcs.LvcsFile (interface)
added: com.intellij.openapi.localVcs.LvcsFileRevision (interface)
added: com.intellij.openapi.localVcs.LvcsLabel (interface)
added: com.intellij.openapi.localVcs.LvcsObject (interface)
added: com.intellij.openapi.localVcs.LvcsRevision (interface)
added: com.intellij.testFramework.EditorActionTestCase (abstract class)
added: com.intellij.testFramework.LightCodeInsightTestCase (class)
added: com.intellij.testFramework.LightIdeaTestCase (class)
added: com.intellij.util.BcelUtils (class)
---
com.intellij.aspects.rt.pattern.RegexpTypePattern (class)
constructor removed: public (String arg1, com.intellij.aspects.b.h arg2,

boolean arg3)

constructor added: public (String arg1, com.intellij.aspects.a.h arg2,

boolean arg3)

---
com.intellij.cvsSupport2.CvsFileRevision (class)
constructor removed: public (b.a.a.a.g.i.d arg1,

com.intellij.openapi.vfs.VirtualFile arg2, b.a.a.a.g.i.c arg3)

constructor added: public (a.a.a.a.d.f.d arg1,

com.intellij.openapi.vfs.VirtualFile arg2, a.a.a.a.d.f.c arg3)

---
com.intellij.cvsSupport2.checkinProject.CvsAddFile (class)
constructor removed: public (String arg1, b.a.a.a.g.bk arg2)
constructor added: public (String arg1, a.a.a.a.d.bk arg2)
---
com.intellij.cvsSupport2.cvshandlers.Checkin (class)
constructor removed: public (com.intellij.openapi.vcs.b.a.g[] arg1,

com.intellij.openapi.project.Project arg2, com.intellij.cvsSupport2.CvsVcs2
arg3, String arg4)

constructor added: public (com.intellij.openapi.vcs.a.a.g[] arg1,

com.intellij.cvsSupport2.CvsVcs2 arg2, String arg3)

throws com.intellij.openapi.vcs.VcsException
---
com.intellij.cvsSupport2.cvshandlers.CvsHandler (abstract class)
field removed: protected

com.intellij.cvsSupport2.cvshandlers.ErrorMessagesProcessor d

field removed: protected

com.intellij.cvsSupport2.cvsmessages.CvsListenerWithProgress i

field removed: protected final java.util.List c
field removed: public static

com.intellij.cvsSupport2.cvshandlers.CvsHandler a

constant removed: public int b = -1
field added: protected

com.intellij.cvsSupport2.cvshandlers.ErrorMessagesProcessor e

field added: protected

com.intellij.cvsSupport2.cvsmessages.CvsListenerWithProgress j

field added: protected final java.util.List d
field added: public static com.intellij.cvsSupport2.cvshandlers.CvsHandler

b

constant added: public int c = -1
---
com.intellij.cvsSupport2.cvsmessages.CvsListenerWithProgress (class)
constructor removed: public (com.intellij.progress.b arg1,

com.intellij.progress.c arg2)

constructor added: public (com.intellij.progress.b arg1)
---
com.intellij.cvsSupport2.cvsmessages.FileMessage (class)
constructor removed: public (b.a.a.a.g.c.c arg1)
constructor added: public (a.a.a.a.d.g.c arg1)
---
com.intellij.cvsSupport2.cvsoperations.AddFilesOperation (class)
constructor removed: public (b.a.a.a.g.bk arg1)
constructor added: public (a.a.a.a.d.bk arg1)
---
com.intellij.cvsSupport2.cvsoperations.CheckoutProjectOperation (class)
constructor removed: public (com.intellij.cvsSupport2.CvsEnvironment arg1,

String arg2, java.io.File arg3, b.a.a.a.j.l arg4)

constructor added: public (com.intellij.cvsSupport2.CvsEnvironment arg1,

String arg2, java.io.File arg3, a.a.a.a.j.l arg4)

---
com.intellij.cvsSupport2.cvsoperations.CvsCommandOperation (abstract

class)

field removed: protected final b.a.a.a.j.l d
field removed: protected final b.a.a.a.j.m e
constructor removed: public (b.a.a.a.j.l arg1)
constructor removed: public (b.a.a.a.j.l arg1, b.a.a.a.j.m arg2)
constructor removed: public (b.a.a.a.j.m arg1)
field added: protected final a.a.a.a.j.l d
field added: protected final a.a.a.a.j.m e
constructor added: public (a.a.a.a.j.l arg1)
constructor added: public (a.a.a.a.j.l arg1, a.a.a.a.j.m arg2)
constructor added: public (a.a.a.a.j.m arg1)
---
com.intellij.cvsSupport2.cvsoperations.CvsOperationOnFiles (abstract

class)

constructor removed: public (b.a.a.a.j.l arg1)
constructor added: public (a.a.a.a.j.l arg1)
---
com.intellij.cvsSupport2.cvsoperations.LocalPathIndifferentOperation

(abstract class)

constructor removed: public (b.a.a.a.j.l arg1, b.a.a.a.j.m arg2,

com.intellij.cvsSupport2.CvsEnvironment arg3)

constructor added: public (a.a.a.a.j.l arg1, a.a.a.a.j.m arg2,

com.intellij.cvsSupport2.CvsEnvironment arg3)

---
com.intellij.cvsSupport2.cvsstatuses.CvsStatusProvider (class)
constant removed: public int b = 3000
---
com.intellij.cvsSupport2.ui.CvsConfigurationListEditor (class)
method removed: protected void doOKAction()
---
com.intellij.cvsSupport2.ui.FileHistoryDialog (class)
constructor removed: public (b.a.a.a.g.i.c arg1,

com.intellij.openapi.vfs.VirtualFile arg2,
com.intellij.openapi.project.Project arg3)

constructor added: public (a.a.a.a.d.f.c arg1,

com.intellij.openapi.vfs.VirtualFile arg2,
com.intellij.openapi.project.Project arg3)

---
com.intellij.cvsSupport2.ui.SelectFileToOpenAsProjectDialod (class)
method added: public javax.swing.JComponent getPreferredFocusedComponent()
---
com.intellij.cvsSupport2.updateinfo.FileTreeNode (class)
constructor removed: public (String arg1, com.intellij.ui.dl arg2,

com.intellij.openapi.project.Project arg3)

constructor added: public (String arg1, com.intellij.ui.dp arg2,

com.intellij.openapi.project.Project arg3)

---
com.intellij.debugger.DebugProcess (interface)
constructor added: public (com.intellij.debugger.r arg1)
---
com.intellij.openapi.editor.Document (interface)
method added: com.intellij.openapi.editor.RangeMarker

createRangeMarker(int arg1, int arg2, boolean arg3)

---
com.intellij.openapi.projectRoots.ProjectRootManager (abstract class)
method removed: public abstract void

removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListe
ner arg1)

method added: public abstract void

removeProjectRootListener(com.intellij.openapi.projectRoots.ProjectRootListe
ner arg1)

---
com.intellij.openapi.vcs.AbstractVcsHelper (abstract class)
method removed: public abstract com.intellij.localVcs.LvcsAction

startVcsAction(String arg1)

method removed: public abstract void

finishVcsAction(com.intellij.localVcs.LvcsAction arg1)

method added: public abstract com.intellij.openapi.localVcs.LvcsAction

startVcsAction(String arg1)

method added: public abstract void

finishVcsAction(com.intellij.openapi.localVcs.LvcsAction arg1)

---
com.intellij.psi.PsiAspectManager (interface)
method added: boolean isAspectsEnabled()
---
com.intellij.psi.PsiPrimitiveType (class)
method removed: public String toString()
---
com.intellij.psi.PsiTreeChangeEvent (abstract class)
constant removed: public String PROP_DIRECTORY_NAME = "packageName"
constant removed: public String PROP_EXCLUDE_ROOTS = "excludeRoots"
constant removed: public String PROP_PROJECT_ROOTS = "projectRoots"
constant added: public String PROP_DIRECTORY_NAME = "directoryName"
---
com.intellij.psi.util.MethodSignature (class)
method added: public static com.intellij.psi.PsiSubstitutor

unifyTypeParametersInSignatures(com.intellij.psi.util.MethodSignature arg0,
com.intellij.psi.util.MethodSignature arg1, com.intellij.psi.PsiSubstitutor
arg2, com.intellij.psi.PsiSubstitutor arg3)

---
com.intellij.psi.util.PsiUtil (class)
method removed: public static boolean

isInheritor(com.intellij.psi.PsiClass arg0, com.intellij.psi.PsiClass arg1,
boolean arg2, boolean arg3)

constant removed: public com.intellij.util.g.n METHOD_SIGNATURE_HASHCODE
method removed: public static java.util.Map

getAllMethods(com.intellij.psi.PsiClass arg0)
[Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Lcom/intellij/psi/Psi
Method;Ljava/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]

method added: public static boolean

areErasureEqual(com.intellij.psi.PsiMethod arg0, com.intellij.psi.PsiMethod
arg1)

method added: public static boolean

hasErrorElementChild(com.intellij.psi.PsiElement arg0)

method added: public static com.intellij.psi.PsiClass

getErasure(com.intellij.psi.PsiClass arg0)

method added: public static com.intellij.psi.PsiMethod[]

findMethodsByName(com.intellij.psi.PsiClass arg0, String arg1, boolean arg2)

constant added: public com.intellij.util.d.n METHOD_SIGNATURE_HASHCODE

[Signature(Lcom/intellij/util/containers/HashCode<Ljava/lang/Object;>;)]

method added: public static java.util.Map

getSameErasureMethods(com.intellij.psi.PsiClass arg0)
[Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Ljava/lang/Object;Lja
va/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]

method added: public static java.util.Map

getSameNameMethods(com.intellij.psi.PsiClass arg0)
[Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Ljava/lang/Object;Lja
va/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]

method added: public static java.util.Map

getSameSignatureMethods(com.intellij.psi.PsiClass arg0)
[Signature((Lcom/intellij/psi/PsiClass;)Ljava/util/Map<Ljava/lang/Object;Lja
va/util/List<Lcom/intellij/psi/PsiMethod;>;>;)]

---
com.intellij.psi.util.PsiUtil$MethodSignatureEquality (class)
constructor removed: public ()
---
com.intellij.ui.TabbedPaneWrapper$TabbedPane (class)
constructor removed: public (com.intellij.ui.ds arg1, int arg2)
constructor added: public (com.intellij.ui.dv arg1, int arg2)

>


0
Comment actions Permalink

Maxim,
That tool does produce this great comparing report?
;)
Is it LocalVCS hidden magic button? :)


It's a small (2 classes, 219 lines, 8.5K) program that I wrote. It uses BCEL.


Timur

0
Comment actions Permalink

Ops, Timur, sorry for calling you by Maxim... I just tired :(

So, do you plan to include this into LocalVCS "History" in Aurora?

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Timur Zambalayev" <no_mail@jetbrains.com> wrote in message
news:7543840.1059580839942.JavaMail.javamailuser@localhost...

Maxim,
That tool does produce this great comparing report?
;)
Is it LocalVCS hidden magic button? :)

>

It's a small (2 classes, 219 lines, 8.5K) program that I wrote. It uses

BCEL.
>
>

Timur

>


0
Comment actions Permalink

Ops, Timur, sorry for calling you by Maxim... I just
tired :(

So, do you plan to include this into LocalVCS
"History" in Aurora?


I'm not a JetBrains employee.

I don't see many uses for this little (standalone) program. In fact I use it only to compare newly-released openapi.jar and idea.jar from time to time.


Timur

0
Comment actions Permalink

do you provide it somewhere in the internet? can you upload it "into" this thread?

0
Comment actions Permalink

=====================================================

 2) {
                                map.put(className, javaClass);
                            }
                        }
                    } finally {
                        inputStream.close();
                    }
                }
            }
        } finally {
            zipFile.close();
        }
        return map;
    }

    private static Delta getDelta(Map map1, Map map2) {
        Collection removedCollection = new ArrayList();
        Collection addedCollection = new ArrayList();
        Collection noChangeCollection = new ArrayList();
        for (Iterator iterator = map1.keySet().iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            if (map2.get(key) == null) {
                removedCollection.add(key);
            } else {
                noChangeCollection.add(key);
            }
        }
        for (Iterator iterator = map2.keySet().iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            if (map1.get(key) == null) {
                addedCollection.add(key);
            }
        }
        return new Delta(removedCollection, addedCollection, noChangeCollection);
    }

    private static void compare(String fileName1, String fileName2) throws IOException {
        System.out.println("======");
        System.out.println("Comparing " + fileName1 + " and " + fileName2);
        Map javaClassMap1 = getJavaClassMap(fileName1);
        Map javaClassMap2 = getJavaClassMap(fileName2);
        Delta delta = getDelta(javaClassMap1, javaClassMap2);
        Collection removedCollection = delta.getRemovedCollection();
        for (Iterator iterator = removedCollection.iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            System.out.println("removed: " + toString((JavaClass) javaClassMap1.get(key)));
        }
        Collection addedCollection = delta.getAddedCollection();
        for (Iterator iterator = addedCollection.iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            System.out.println("added: " + toString((JavaClass) javaClassMap2.get(key)));
        }
        Collection noChangeCollection = delta.getNoChangeCollection();
        for (Iterator iterator = noChangeCollection.iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            compare((JavaClass) javaClassMap1.get(key), (JavaClass) javaClassMap2.get(key));
        }
    }

    private static Map getMethodMap(JavaClass javaClass) {
        Map map = new TreeMap();
        Method[] methods = javaClass.getMethods();
        for (int i = 0; i < methods.length; i++) {
            Method method = methods+;
            if ((method.isPublic() || method.isProtected()) && method.getName().length() > 1) {
                map.put(method.toString(), method);
            }
        }
        Field[] fields = javaClass.getFields();
        for (int i = 0; i < fields.length; i++) {
            Field field = fields+;
            if (field.isPublic() || field.isProtected()) {
                map.put(field.toString(), field);
            }
        }
        return map;
    }

    private static void compare(JavaClass javaClass1, JavaClass javaClass2) {
        Map methodMap1 = getMethodMap(javaClass1);
        Map methodMap2 = getMethodMap(javaClass2);
        Delta delta = getDelta(methodMap1, methodMap2);
        Collection removedCollection = delta.getRemovedCollection();
        Collection addedCollection = delta.getAddedCollection();
        if (!removedCollection.isEmpty() || !addedCollection.isEmpty()) {
            System.out.println("---");
            System.out.println(toString(javaClass1));
        }
        boolean isInterface = javaClass1.isInterface();
        for (Iterator iterator = removedCollection.iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            Object value = methodMap1.get(key);
            System.out.println(toString(value, " removed: ", isInterface));
        }
        for (Iterator iterator = addedCollection.iterator(); iterator.hasNext();) {
            Object key = iterator.next();
            Object value = methodMap2.get(key);
            System.out.println(toString(value, " added: ", isInterface));
        }
    }

    private static String toString(JavaClass javaClass) {
        String string = "";
        if (javaClass.isProtected()) {
            string += "protected ";
        }
        if (javaClass.isInterface()) {
            string += "interface";
        } else {
            if (javaClass.isAbstract()) {
                string += "abstract ";
            } else if (javaClass.isFinal()) {
                string += "final ";
            }
            string += "class";
        }
        return javaClass.getClassName() + " (" + string + ")";
    }

    private static String toString(Object value, String s, boolean isInterface) {
        String p = value.toString();
        String modifierString = "public abstract ";
        if (isInterface && p.startsWith(modifierString)) {
            p = p.substring(modifierString.length());
        }
        String featureName = "feature";
        if (value instanceof Method) {
            featureName = "method";
            Method method = (Method) value;
            if (method.getName().equals("")) {
                featureName = "constructor";
                p = p.replaceFirst("void ", "");
            }
        } else if (value instanceof Field) {
            featureName = "field";
            Field field = (Field) value;
            if (field.isStatic() && field.isFinal()) {
                featureName = "constant";
                p = p.replaceFirst("static final ", "");
            }
        }
        return featureName + s + p;
    }

    public static void main(String[] args) throws IOException {
        if (args.length == 2) {
            compare(args[0], args[1]);
        } else {
            System.out.println("two parameters: filename1 filename2");
        }
    }

}
]]>

=====================================================

=====================================================

0
Comment actions Permalink

Thank you, Timur!

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Timur Zambalayev" <no_mail@jetbrains.com> wrote in message
news:26267077.1059634976860.JavaMail.javamailuser@localhost...

=====================================================

 package apiComparison;
>
> import java.io.IOException;
> import java.io.InputStream;
> import java.util.ArrayList;
> import java.util.Collection;
> import java.util.Enumeration;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.TreeMap;
> import java.util.zip.ZipEntry;
> import java.util.zip.ZipFile;
>
> import org.apache.bcel.classfile.ClassParser;
> import org.apache.bcel.classfile.Field;
> import org.apache.bcel.classfile.JavaClass;
> import org.apache.bcel.classfile.Method;
>
> final class ApiComparison {
>
>     private static Map getJavaClassMap(String fileName) throws IOException
{
>         Map map = new TreeMap();
>         ZipFile zipFile = new ZipFile(fileName);
>         try {
>             Enumeration enumeration = zipFile.entries();
>             while (enumeration.hasMoreElements()) {
>                 ZipEntry zipEntry = (ZipEntry) enumeration.nextElement();
>                 String entryName = zipEntry.getName();
>                 if (entryName.endsWith(".class")) {
>                     InputStream inputStream =
zipFile.getInputStream(zipEntry);
>                     try {
>                         JavaClass javaClass = new ClassParser(inputStream,
entryName).parse();
>                         if (javaClass.isPublic() ||
javaClass.isProtected()) {
>                             String className = javaClass.getClassName();
>                             String[] names = className.split("\\x2E"); //
dot, '.'
>                             String simpleClassName = names[names.length -
1];
>                             if
(!Character.isLowerCase(simpleClassName.charAt(0)) ||
simpleClassName.length() > 2) {
>                                 map.put(className, javaClass);
>                             }
>                         }
>                     } finally {
>                         inputStream.close();
>                     }
>                 }
>             }
>         } finally {
>             zipFile.close();
>         }
>         return map;
>     }
>
>     private static Delta getDelta(Map map1, Map map2) {
>         Collection removedCollection = new ArrayList();
>         Collection addedCollection = new ArrayList();
>         Collection noChangeCollection = new ArrayList();
>         for (Iterator iterator = map1.keySet().iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             if (map2.get(key) == null) {
>                 removedCollection.add(key);
>             } else {
>                 noChangeCollection.add(key);
>             }
>         }
>         for (Iterator iterator = map2.keySet().iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             if (map1.get(key) == null) {
>                 addedCollection.add(key);
>             }
>         }
>         return new Delta(removedCollection, addedCollection,
noChangeCollection);
>     }
>
>     private static void compare(String fileName1, String fileName2) throws
IOException {
>         System.out.println("======");
>         System.out.println("Comparing " + fileName1 + " and " +
fileName2);
>         Map javaClassMap1 = getJavaClassMap(fileName1);
>         Map javaClassMap2 = getJavaClassMap(fileName2);
>         Delta delta = getDelta(javaClassMap1, javaClassMap2);
>         Collection removedCollection = delta.getRemovedCollection();
>         for (Iterator iterator = removedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             System.out.println("removed: " + toString((JavaClass)
javaClassMap1.get(key)));
>         }
>         Collection addedCollection = delta.getAddedCollection();
>         for (Iterator iterator = addedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             System.out.println("added: " + toString((JavaClass)
javaClassMap2.get(key)));
>         }
>         Collection noChangeCollection = delta.getNoChangeCollection();
>         for (Iterator iterator = noChangeCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             compare((JavaClass) javaClassMap1.get(key), (JavaClass)
javaClassMap2.get(key));
>         }
>     }
>
>     private static Map getMethodMap(JavaClass javaClass) {
>         Map map = new TreeMap();
>         Method[] methods = javaClass.getMethods();
>         for (int i = 0; i < methods.length; i++) {
>             Method method = methods+;
>             if ((method.isPublic() || method.isProtected()) &&
method.getName().length() > 1) {
>                 map.put(method.toString(), method);
>             }
>         }
>         Field[] fields = javaClass.getFields();
>         for (int i = 0; i < fields.length; i++) {
>             Field field = fields+;
>             if (field.isPublic() || field.isProtected()) {
>                 map.put(field.toString(), field);
>             }
>         }
>         return map;
>     }
>
>     private static void compare(JavaClass javaClass1, JavaClass
javaClass2) {
>         Map methodMap1 = getMethodMap(javaClass1);
>         Map methodMap2 = getMethodMap(javaClass2);
>         Delta delta = getDelta(methodMap1, methodMap2);
>         Collection removedCollection = delta.getRemovedCollection();
>         Collection addedCollection = delta.getAddedCollection();
>         if (!removedCollection.isEmpty() || !addedCollection.isEmpty()) {
>             System.out.println("---");
>             System.out.println(toString(javaClass1));
>         }
>         boolean isInterface = javaClass1.isInterface();
>         for (Iterator iterator = removedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             Object value = methodMap1.get(key);
>             System.out.println(toString(value, " removed: ",
isInterface));
>         }
>         for (Iterator iterator = addedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             Object value = methodMap2.get(key);
>             System.out.println(toString(value, " added: ", isInterface));
>         }
>     }
>
>     private static String toString(JavaClass javaClass) {
>         String string = "";
>         if (javaClass.isProtected()) {
>             string += "protected ";
>         }
>         if (javaClass.isInterface()) {
>             string += "interface";
>         } else {
>             if (javaClass.isAbstract()) {
>                 string += "abstract ";
>             } else if (javaClass.isFinal()) {
>                 string += "final ";
>             }
>             string += "class";
>         }
>         return javaClass.getClassName() + " (" + string + ")";
>     }
>
>     private static String toString(Object value, String s, boolean
isInterface) {
>         String p = value.toString();
>         String modifierString = "public abstract ";
>         if (isInterface && p.startsWith(modifierString)) {
>             p = p.substring(modifierString.length());
>         }
>         String featureName = "feature";
>         if (value instanceof Method) {
>             featureName = "method";
>             Method method = (Method) value;
>             if (method.getName().equals("")) {
>                 featureName = "constructor";
>                 p = p.replaceFirst("void ", "");
>             }
>         } else if (value instanceof Field) {
>             featureName = "field";
>             Field field = (Field) value;
>             if (field.isStatic() && field.isFinal()) {
>                 featureName = "constant";
>                 p = p.replaceFirst("static final ", "");
>             }
>         }
>         return featureName + s + p;
>     }
>
>     public static void main(String[] args) throws IOException {
>         if (args.length == 2) {
>             compare(args[0], args[1]);
>         } else {
>             System.out.println("two parameters: filename1 filename2");
>         }
>     }
>
> }
> ]]>

=====================================================

 package apiComparison;
>
> import java.util.Collection;
>
> final class Delta {
>
>     private final Collection removedCollection;
>     private final Collection addedCollection;
>     private final Collection noChangeCollection;
>
>     Delta(Collection removedCollection, Collection addedCollection,
Collection noChangeCollection) {
>         this.removedCollection = removedCollection;
>         this.addedCollection = addedCollection;
>         this.noChangeCollection = noChangeCollection;
>     }
>
>     Collection getRemovedCollection() {
>         return removedCollection;
>     }
>
>     Collection getAddedCollection() {
>         return addedCollection;
>     }
>
>     Collection getNoChangeCollection() {
>         return noChangeCollection;
>     }
>
> }
> ]]>

=====================================================



0
Comment actions Permalink

I will try to implement plugin with your code using Diff panel soon, maybe
your code will uses by more peoples :))

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Timur Zambalayev" <no_mail@jetbrains.com> wrote in message
news:26267077.1059634976860.JavaMail.javamailuser@localhost...

=====================================================

 package apiComparison;
>
> import java.io.IOException;
> import java.io.InputStream;
> import java.util.ArrayList;
> import java.util.Collection;
> import java.util.Enumeration;
> import java.util.Iterator;
> import java.util.Map;
> import java.util.TreeMap;
> import java.util.zip.ZipEntry;
> import java.util.zip.ZipFile;
>
> import org.apache.bcel.classfile.ClassParser;
> import org.apache.bcel.classfile.Field;
> import org.apache.bcel.classfile.JavaClass;
> import org.apache.bcel.classfile.Method;
>
> final class ApiComparison {
>
>     private static Map getJavaClassMap(String fileName) throws IOException
{
>         Map map = new TreeMap();
>         ZipFile zipFile = new ZipFile(fileName);
>         try {
>             Enumeration enumeration = zipFile.entries();
>             while (enumeration.hasMoreElements()) {
>                 ZipEntry zipEntry = (ZipEntry) enumeration.nextElement();
>                 String entryName = zipEntry.getName();
>                 if (entryName.endsWith(".class")) {
>                     InputStream inputStream =
zipFile.getInputStream(zipEntry);
>                     try {
>                         JavaClass javaClass = new ClassParser(inputStream,
entryName).parse();
>                         if (javaClass.isPublic() ||
javaClass.isProtected()) {
>                             String className = javaClass.getClassName();
>                             String[] names = className.split("\\x2E"); //
dot, '.'
>                             String simpleClassName = names[names.length -
1];
>                             if
(!Character.isLowerCase(simpleClassName.charAt(0)) ||
simpleClassName.length() > 2) {
>                                 map.put(className, javaClass);
>                             }
>                         }
>                     } finally {
>                         inputStream.close();
>                     }
>                 }
>             }
>         } finally {
>             zipFile.close();
>         }
>         return map;
>     }
>
>     private static Delta getDelta(Map map1, Map map2) {
>         Collection removedCollection = new ArrayList();
>         Collection addedCollection = new ArrayList();
>         Collection noChangeCollection = new ArrayList();
>         for (Iterator iterator = map1.keySet().iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             if (map2.get(key) == null) {
>                 removedCollection.add(key);
>             } else {
>                 noChangeCollection.add(key);
>             }
>         }
>         for (Iterator iterator = map2.keySet().iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             if (map1.get(key) == null) {
>                 addedCollection.add(key);
>             }
>         }
>         return new Delta(removedCollection, addedCollection,
noChangeCollection);
>     }
>
>     private static void compare(String fileName1, String fileName2) throws
IOException {
>         System.out.println("======");
>         System.out.println("Comparing " + fileName1 + " and " +
fileName2);
>         Map javaClassMap1 = getJavaClassMap(fileName1);
>         Map javaClassMap2 = getJavaClassMap(fileName2);
>         Delta delta = getDelta(javaClassMap1, javaClassMap2);
>         Collection removedCollection = delta.getRemovedCollection();
>         for (Iterator iterator = removedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             System.out.println("removed: " + toString((JavaClass)
javaClassMap1.get(key)));
>         }
>         Collection addedCollection = delta.getAddedCollection();
>         for (Iterator iterator = addedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             System.out.println("added: " + toString((JavaClass)
javaClassMap2.get(key)));
>         }
>         Collection noChangeCollection = delta.getNoChangeCollection();
>         for (Iterator iterator = noChangeCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             compare((JavaClass) javaClassMap1.get(key), (JavaClass)
javaClassMap2.get(key));
>         }
>     }
>
>     private static Map getMethodMap(JavaClass javaClass) {
>         Map map = new TreeMap();
>         Method[] methods = javaClass.getMethods();
>         for (int i = 0; i < methods.length; i++) {
>             Method method = methods+;
>             if ((method.isPublic() || method.isProtected()) &&
method.getName().length() > 1) {
>                 map.put(method.toString(), method);
>             }
>         }
>         Field[] fields = javaClass.getFields();
>         for (int i = 0; i < fields.length; i++) {
>             Field field = fields+;
>             if (field.isPublic() || field.isProtected()) {
>                 map.put(field.toString(), field);
>             }
>         }
>         return map;
>     }
>
>     private static void compare(JavaClass javaClass1, JavaClass
javaClass2) {
>         Map methodMap1 = getMethodMap(javaClass1);
>         Map methodMap2 = getMethodMap(javaClass2);
>         Delta delta = getDelta(methodMap1, methodMap2);
>         Collection removedCollection = delta.getRemovedCollection();
>         Collection addedCollection = delta.getAddedCollection();
>         if (!removedCollection.isEmpty() || !addedCollection.isEmpty()) {
>             System.out.println("---");
>             System.out.println(toString(javaClass1));
>         }
>         boolean isInterface = javaClass1.isInterface();
>         for (Iterator iterator = removedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             Object value = methodMap1.get(key);
>             System.out.println(toString(value, " removed: ",
isInterface));
>         }
>         for (Iterator iterator = addedCollection.iterator();
iterator.hasNext();) {
>             Object key = iterator.next();
>             Object value = methodMap2.get(key);
>             System.out.println(toString(value, " added: ", isInterface));
>         }
>     }
>
>     private static String toString(JavaClass javaClass) {
>         String string = "";
>         if (javaClass.isProtected()) {
>             string += "protected ";
>         }
>         if (javaClass.isInterface()) {
>             string += "interface";
>         } else {
>             if (javaClass.isAbstract()) {
>                 string += "abstract ";
>             } else if (javaClass.isFinal()) {
>                 string += "final ";
>             }
>             string += "class";
>         }
>         return javaClass.getClassName() + " (" + string + ")";
>     }
>
>     private static String toString(Object value, String s, boolean
isInterface) {
>         String p = value.toString();
>         String modifierString = "public abstract ";
>         if (isInterface && p.startsWith(modifierString)) {
>             p = p.substring(modifierString.length());
>         }
>         String featureName = "feature";
>         if (value instanceof Method) {
>             featureName = "method";
>             Method method = (Method) value;
>             if (method.getName().equals("")) {
>                 featureName = "constructor";
>                 p = p.replaceFirst("void ", "");
>             }
>         } else if (value instanceof Field) {
>             featureName = "field";
>             Field field = (Field) value;
>             if (field.isStatic() && field.isFinal()) {
>                 featureName = "constant";
>                 p = p.replaceFirst("static final ", "");
>             }
>         }
>         return featureName + s + p;
>     }
>
>     public static void main(String[] args) throws IOException {
>         if (args.length == 2) {
>             compare(args[0], args[1]);
>         } else {
>             System.out.println("two parameters: filename1 filename2");
>         }
>     }
>
> }
> ]]>

=====================================================

 package apiComparison;
>
> import java.util.Collection;
>
> final class Delta {
>
>     private final Collection removedCollection;
>     private final Collection addedCollection;
>     private final Collection noChangeCollection;
>
>     Delta(Collection removedCollection, Collection addedCollection,
Collection noChangeCollection) {
>         this.removedCollection = removedCollection;
>         this.addedCollection = addedCollection;
>         this.noChangeCollection = noChangeCollection;
>     }
>
>     Collection getRemovedCollection() {
>         return removedCollection;
>     }
>
>     Collection getAddedCollection() {
>         return addedCollection;
>     }
>
>     Collection getNoChangeCollection() {
>         return noChangeCollection;
>     }
>
> }
> ]]>

=====================================================



0
Comment actions Permalink

that's a great idea! please let us know when the plugin is available.

0
Comment actions Permalink

FYI, Diff panel api is changed and it quite different from old one (however
new api is not opened yet).

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

"Develop with pleasure!"
"Alexey Efimov" <aefimov@spklabs.com> wrote in message
news:bgaoq4$3td$1@is.intellij.net...

I will try to implement plugin with your code using Diff panel soon, maybe
your code will uses by more peoples :))

>

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Timur Zambalayev" <no_mail@jetbrains.com> wrote in message
news:26267077.1059634976860.JavaMail.javamailuser@localhost...

=====================================================

 > package apiComparison;
> >
> > import java.io.IOException;
> > import java.io.InputStream;
> > import java.util.ArrayList;
> > import java.util.Collection;
> > import java.util.Enumeration;
> > import java.util.Iterator;
> > import java.util.Map;
> > import java.util.TreeMap;
> > import java.util.zip.ZipEntry;
> > import java.util.zip.ZipFile;
> >
> > import org.apache.bcel.classfile.ClassParser;
> > import org.apache.bcel.classfile.Field;
> > import org.apache.bcel.classfile.JavaClass;
> > import org.apache.bcel.classfile.Method;
> >
> > final class ApiComparison {
> >
> >     private static Map getJavaClassMap(String fileName) throws
IOException
> {
> >         Map map = new TreeMap();
> >         ZipFile zipFile = new ZipFile(fileName);
> >         try {
> >             Enumeration enumeration = zipFile.entries();
> >             while (enumeration.hasMoreElements()) {
> >                 ZipEntry zipEntry = (ZipEntry)
enumeration.nextElement();
> >                 String entryName = zipEntry.getName();
> >                 if (entryName.endsWith(".class")) {
> >                     InputStream inputStream =
> zipFile.getInputStream(zipEntry);
> >                     try {
> >                         JavaClass javaClass = new
ClassParser(inputStream,
> entryName).parse();
> >                         if (javaClass.isPublic() ||
> javaClass.isProtected()) {
> >                             String className = javaClass.getClassName();
> >                             String[] names = className.split("\\x2E");
//
> dot, '.'
> >                             String simpleClassName =
names[names.length -
> 1];
> >                             if
> (!Character.isLowerCase(simpleClassName.charAt(0)) ||
> simpleClassName.length() > 2) {
> >                                 map.put(className, javaClass);
> >                             }
> >                         }
> >                     } finally {
> >                         inputStream.close();
> >                     }
> >                 }
> >             }
> >         } finally {
> >             zipFile.close();
> >         }
> >         return map;
> >     }
> >
> >     private static Delta getDelta(Map map1, Map map2) {
> >         Collection removedCollection = new ArrayList();
> >         Collection addedCollection = new ArrayList();
> >         Collection noChangeCollection = new ArrayList();
> >         for (Iterator iterator = map1.keySet().iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             if (map2.get(key) == null) {
> >                 removedCollection.add(key);
> >             } else {
> >                 noChangeCollection.add(key);
> >             }
> >         }
> >         for (Iterator iterator = map2.keySet().iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             if (map1.get(key) == null) {
> >                 addedCollection.add(key);
> >             }
> >         }
> >         return new Delta(removedCollection, addedCollection,
> noChangeCollection);
> >     }
> >
> >     private static void compare(String fileName1, String fileName2)
throws
> IOException {
> >         System.out.println("======");
> >         System.out.println("Comparing " + fileName1 + " and " +
> fileName2);
> >         Map javaClassMap1 = getJavaClassMap(fileName1);
> >         Map javaClassMap2 = getJavaClassMap(fileName2);
> >         Delta delta = getDelta(javaClassMap1, javaClassMap2);
> >         Collection removedCollection = delta.getRemovedCollection();
> >         for (Iterator iterator = removedCollection.iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             System.out.println("removed: " + toString((JavaClass)
> javaClassMap1.get(key)));
> >         }
> >         Collection addedCollection = delta.getAddedCollection();
> >         for (Iterator iterator = addedCollection.iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             System.out.println("added: " + toString((JavaClass)
> javaClassMap2.get(key)));
> >         }
> >         Collection noChangeCollection = delta.getNoChangeCollection();
> >         for (Iterator iterator = noChangeCollection.iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             compare((JavaClass) javaClassMap1.get(key), (JavaClass)
> javaClassMap2.get(key));
> >         }
> >     }
> >
> >     private static Map getMethodMap(JavaClass javaClass) {
> >         Map map = new TreeMap();
> >         Method[] methods = javaClass.getMethods();
> >         for (int i = 0; i < methods.length; i++) {
> >             Method method = methods+;
> >             if ((method.isPublic() || method.isProtected()) &&
> method.getName().length() > 1) {
> >                 map.put(method.toString(), method);
> >             }
> >         }
> >         Field[] fields = javaClass.getFields();
> >         for (int i = 0; i < fields.length; i++) {
> >             Field field = fields+;
> >             if (field.isPublic() || field.isProtected()) {
> >                 map.put(field.toString(), field);
> >             }
> >         }
> >         return map;
> >     }
> >
> >     private static void compare(JavaClass javaClass1, JavaClass
> javaClass2) {
> >         Map methodMap1 = getMethodMap(javaClass1);
> >         Map methodMap2 = getMethodMap(javaClass2);
> >         Delta delta = getDelta(methodMap1, methodMap2);
> >         Collection removedCollection = delta.getRemovedCollection();
> >         Collection addedCollection = delta.getAddedCollection();
> >         if (!removedCollection.isEmpty() || !addedCollection.isEmpty())
{
> >             System.out.println("---");
> >             System.out.println(toString(javaClass1));
> >         }
> >         boolean isInterface = javaClass1.isInterface();
> >         for (Iterator iterator = removedCollection.iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             Object value = methodMap1.get(key);
> >             System.out.println(toString(value, " removed: ",
> isInterface));
> >         }
> >         for (Iterator iterator = addedCollection.iterator();
> iterator.hasNext();) {
> >             Object key = iterator.next();
> >             Object value = methodMap2.get(key);
> >             System.out.println(toString(value, " added: ",
isInterface));
> >         }
> >     }
> >
> >     private static String toString(JavaClass javaClass) {
> >         String string = "";
> >         if (javaClass.isProtected()) {
> >             string += "protected ";
> >         }
> >         if (javaClass.isInterface()) {
> >             string += "interface";
> >         } else {
> >             if (javaClass.isAbstract()) {
> >                 string += "abstract ";
> >             } else if (javaClass.isFinal()) {
> >                 string += "final ";
> >             }
> >             string += "class";
> >         }
> >         return javaClass.getClassName() + " (" + string + ")";
> >     }
> >
> >     private static String toString(Object value, String s, boolean
> isInterface) {
> >         String p = value.toString();
> >         String modifierString = "public abstract ";
> >         if (isInterface && p.startsWith(modifierString)) {
> >             p = p.substring(modifierString.length());
> >         }
> >         String featureName = "feature";
> >         if (value instanceof Method) {
> >             featureName = "method";
> >             Method method = (Method) value;
> >             if (method.getName().equals("")) {
> >                 featureName = "constructor";
> >                 p = p.replaceFirst("void ", "");
> >             }
> >         } else if (value instanceof Field) {
> >             featureName = "field";
> >             Field field = (Field) value;
> >             if (field.isStatic() && field.isFinal()) {
> >                 featureName = "constant";
> >                 p = p.replaceFirst("static final ", "");
> >             }
> >         }
> >         return featureName + s + p;
> >     }
> >
> >     public static void main(String[] args) throws IOException {
> >         if (args.length == 2) {
> >             compare(args[0], args[1]);
> >         } else {
> >             System.out.println("two parameters: filename1 filename2");
> >         }
> >     }
> >
> > }
> > ]]>

=====================================================

 > package apiComparison;
> >
> > import java.util.Collection;
> >
> > final class Delta {
> >
> >     private final Collection removedCollection;
> >     private final Collection addedCollection;
> >     private final Collection noChangeCollection;
> >
> >     Delta(Collection removedCollection, Collection addedCollection,
> Collection noChangeCollection) {
> >         this.removedCollection = removedCollection;
> >         this.addedCollection = addedCollection;
> >         this.noChangeCollection = noChangeCollection;
> >     }
> >
> >     Collection getRemovedCollection() {
> >         return removedCollection;
> >     }
> >
> >     Collection getAddedCollection() {
> >         return addedCollection;
> >     }
> >
> >     Collection getNoChangeCollection() {
> >         return noChangeCollection;
> >     }
> >
> > }
> > ]]>

=====================================================

>
>


0
Comment actions Permalink

Hello Dmitry,

I already created plugin for comparing... But i not understand you about new
Diff API. :)

Now Diff API provide only text comparing. I implement in APIComparator the
myown TreeComparator interface and make SPI for tree comparing. In private
case for Jar's tree, but theoretical TreeComparator may compare any tries.

So, that kind of changes in Diff panel will soon? Is it now supported tree
or document comparing?

Thank you!

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:bha8fa$ms3$1@is.intellij.net...

FYI, Diff panel api is changed and it quite different from old one

(however

new api is not opened yet).

>

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

>


0
Comment actions Permalink

Diff API changes will affect DiffPanel interface - the way you tell what to
show. It is needed to support merge.
What do you mean by tree/document comparison? Comparison of documents of
known structure? No we do not plan it now, beacause of obviously best ways
to perform it cost too much time and memory.

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com


"Alexey Efimov" <aefimov@spklabs.com> wrote in message
news:bhaj1j$d82$1@is.intellij.net...

Hello Dmitry,

>

I already created plugin for comparing... But i not understand you about

new

Diff API. :)

>

Now Diff API provide only text comparing. I implement in APIComparator the
myown TreeComparator interface and make SPI for tree comparing. In private
case for Jar's tree, but theoretical TreeComparator may compare any tries.

>

So, that kind of changes in Diff panel will soon? Is it now supported tree
or document comparing?

>

Thank you!

>

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:bha8fa$ms3$1@is.intellij.net...

FYI, Diff panel api is changed and it quite different from old one

(however

new api is not opened yet).

>

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

>

>
>


0
Comment actions Permalink

Hi,

Diff API changes will affect DiffPanel interface - the way you tell what

to

show. It is needed to support merge.


As i know i can tell to "what" is shown in DiffPanel since it avaible in
OpenAPI. New enchancements of DiffPanel allow control "how" it show?

Thank you

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:bhcv29$vag$1@is.intellij.net...

Diff API changes will affect DiffPanel interface - the way you tell what

to

show. It is needed to support merge.
What do you mean by tree/document comparison? Comparison of documents of
known structure? No we do not plan it now, beacause of obviously best ways
to perform it cost too much time and memory.

>

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

>
>

"Alexey Efimov" <aefimov@spklabs.com> wrote in message
news:bhaj1j$d82$1@is.intellij.net...

Hello Dmitry,

>

I already created plugin for comparing... But i not understand you about

new

Diff API. :)

>

Now Diff API provide only text comparing. I implement in APIComparator

the

myown TreeComparator interface and make SPI for tree comparing. In

private

case for Jar's tree, but theoretical TreeComparator may compare any

tries.

>

So, that kind of changes in Diff panel will soon? Is it now supported

tree

or document comparing?

>

Thank you!

>

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Dmitry Peshehonov" <dyoma@intellij.com> wrote in message
news:bha8fa$ms3$1@is.intellij.net...

FYI, Diff panel api is changed and it quite different from old one

(however

new api is not opened yet).

>

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

>

>
>

>
>


0
Comment actions Permalink

"Alexey Efimov" <aefimov@spklabs.com> wrote in message
news:bhd017$6mj$1@is.intellij.net...

Hi,

>

Diff API changes will affect DiffPanel interface - the way you tell what

to

show. It is needed to support merge.

>

As i know i can tell to "what" is shown in DiffPanel since it avaible in
OpenAPI. New enchancements of DiffPanel allow control "how" it show?

>
We have regrouped content properties such as text, source file and file
type (since we support comparison of any two files and their fragments).
More over comparing two strings doesn't seem to be a good way to merge them
(e.g. what should we do with new lines?), so we switched to compare our
editor's documents (and now client code is responsible for converting
strings back to binrary representation, not DiffPanel), btw this approach
solves problems of merging opened files. Such changes conflicts with the old
interface a bit.
"How" is kept: you set texts and its highlighting. DiffPanel decides
what is changed and shows it. The only excention is folding support (works
bad in last EAP build - accidentally this half-implemented feature became
avaliable).

--
Best regards,
Dmitry Peshehonov
JetBrains, Inc, http://www.intellij.com

"Develop with pleasure!"


0

Please sign in to leave a comment.