Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

ConfigurationTab issue #3749

benprim ·

Dear all,
I'm trying to create a ConfigurationTabContribution puglin, but I'm hitting an issue with java Generics that I don't know how to solve.
So in my :
public List getTabs() {

}

I'm trying to add a new ConfigurationTab and ConfigurationTab constructors is expecting : String title, Class<? extends ConfigurationPage>[] pageClasses

I created a class ViewPage which extends ConfigurationPage but however I try to pass it to the ConfigurationTab constructor I have compiler error.
Would you have a sample on how to do that ?

  • replies 2
  • views 2844
  • stars 0
robinshen ADMIN ·

Below code should work:

List<ConfigurationTab> tabs = new ArrayList<>();
tabs.add(new ConfigurationTab("title", ViewPage.class));
return tabs;
benprim ·

Thanks Robin, sorry I don't know I was focusing on the object instead of the class...