talk114 / obfuscate4e

Automatically exported from code.google.com/p/obfuscate4e
0 stars 0 forks source link

Some classes are not detected in plugin.xml #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I've been using obfuscate4e for a while now with our RPC application and
our new GMF plugins are missing a lot of keep class statements in proguard.cgf

I downloaded the latest source code to debug the problem. It seems like the
class schema attributes in GMF are often declared as simple strings, while
the code correctly looks for attributes or type JAVA.

I could go and request the GMF project to update all their schemas, but I'm
sure other people are bound to make the same error, so I think we should
include every attribute when the name is class. The worst that can happen
is proguard ignoring the statement if it is not a class.

Basically modify the if statement in ProjectInfo.java to:
if (IMetaAttribute.JAVA == schemaAttribute.getKind() ||
"class".equals(schemaAttribute.getName())) {
    resultList.add(pluginAttribute.getValue());
}

Original issue reported on code.google.com by dcende...@gmail.com on 2 Dec 2009 at 12:47

GoogleCodeExporter commented 8 years ago
Thanks for your report. Can you please provide some example GMF code to 
illustrate the problem?

Original comment by schoobidoo on 14 Dec 2009 at 9:12

GoogleCodeExporter commented 8 years ago
Changed ticket type from "defect" to "enhancement"

Original comment by schoobidoo on 14 Dec 2009 at 9:13

GoogleCodeExporter commented 8 years ago
Here is a small project to illustrate it.

in gmf.diagram, you can notice some extensions have a class attribute defined 
as text
and not java.

org.eclipse.gmf.runtime.diagram.core.viewProviders
org.eclipse.gmf.runtime.diagram.ui.editpartProviders

There are more extensions with the same problem to customize the GMF project 
(not in
the sample project):

org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders
org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders

Original comment by dcende...@gmail.com on 12 Jan 2010 at 1:37

Attachments: