testng-team / testng-eclipse

Eclipse plug-in for TestNG
https://testng.org
194 stars 164 forks source link

Missing class usage StringMatcher in eclipse internal code #514

Closed gayanper closed 3 years ago

gayanper commented 3 years ago

The Usage of StringMatcher org.eclipse.ui.internal.misc.StringMatcher org.eclipse.ui.internal.ide.StringMatcher

needs to migrate to

org.eclipse.core.text.StringMatcher

according to https://bugs.eclipse.org/bugs/show_bug.cgi?id=564946. This can cause problems if this plugin is used in later versions where this Eclipse version and execute the code which require the missing class.

missedone commented 3 years ago

@gayanper , thanks for reporting it, could you like to raise a PR? Thanks, Nick

gayanper commented 3 years ago

@missedone to fix this we need to bump the target version to something like 2020-06, So i need your input on how do you want to handle this, if we change the target version then we problem need to have a maintenance branch and a maintenance p2 site to support old releases.

missedone commented 3 years ago

@gayanper , checked around the code, we don't heavily rely on StringMatcher, so I think we have two options:

  1. copy org.eclipse.core.text.StringMatcher to testng eclipse plugin project, it's a such standalone helper class so looks like we just need to copy one class
  2. replace StringMatcher with something else.

what do you think?

gayanper commented 3 years ago

@missedone

I thought about making a copy. But not sure about licensing. I couldn’t find license headers or file.

Using something else is a good suggestion as well. I can look into that or writing something simple in plugin it self.

missedone commented 3 years ago

@gayanper , i think the license should be fine, you can see the license header on top of the code https://github.com/eclipse/rt.equinox.bundles/blob/master/bundles/org.eclipse.equinox.common/src/org/eclipse/core/text/StringMatcher.java#L5-L7

and EPL is a weak copyleft license, which grant rights to copy, adapt and distribute the program in source or object code form

gayanper commented 3 years ago

@missedone sure i will look into it. From license i meant the licensing of this plugins 🙂. But i think you have a better idea so let’s proceed like that.

missedone commented 3 years ago

@gayanper , done in #519