[jbosstools-issues] [JBoss JIRA] (JBIDE-18903) Refactor implementations of ITagLibRecognizer

Viacheslav Kabanovich (JIRA) issues at jboss.org
Tue Dec 9 15:21:39 EST 2014


     [ https://issues.jboss.org/browse/JBIDE-18903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Viacheslav Kabanovich updated JBIDE-18903:
------------------------------------------
    Description: 
Currently, implementations of methods
{code}
boolean shouldBeLoaded(ITagLibrary lib, ELContext context);
boolean isUsed(IHTMLLibraryVersion version, ELContext context);
boolean isUsed(IHTMLLibraryVersion version, IFile file);
{code}
do the same but it is not evident since the code is not reused properly.
For now, it is better to implement two new methods through the old one and in future change only for subclasses that would really by some reasons need different implementation.

Second commit should change interface methods as follows
{code}
boolean ITagLibRecognizer.isUsed(ELContext context);
boolean ITagLibRecognizer.isUsed(IFile file);
IHTMLLibraryVersion ITagLibVersionRecognizer.getVersion(ELContext context);
{code}


  was:
Currently, implementations of methods
{code}
boolean shouldBeLoaded(ITagLibrary lib, ELContext context);
boolean isUsed(IHTMLLibraryVersion version, ELContext context);
boolean isUsed(IHTMLLibraryVersion version, IFile file);
{code}
do the same but it is not evident since the code is not reused properly.
For now, it is better to implement two new methods through the old one and in future change only for subclasses that would really by some reasons need different implementation.





> Refactor implementations of ITagLibRecognizer
> ---------------------------------------------
>
>                 Key: JBIDE-18903
>                 URL: https://issues.jboss.org/browse/JBIDE-18903
>             Project: Tools (JBoss Tools)
>          Issue Type: Task
>          Components: jsp/jsf/xml/html source editing
>    Affects Versions: 4.3.0.Alpha1
>            Reporter: Viacheslav Kabanovich
>            Assignee: Viacheslav Kabanovich
>             Fix For: 4.3.0.Alpha1
>
>
> Currently, implementations of methods
> {code}
> boolean shouldBeLoaded(ITagLibrary lib, ELContext context);
> boolean isUsed(IHTMLLibraryVersion version, ELContext context);
> boolean isUsed(IHTMLLibraryVersion version, IFile file);
> {code}
> do the same but it is not evident since the code is not reused properly.
> For now, it is better to implement two new methods through the old one and in future change only for subclasses that would really by some reasons need different implementation.
> Second commit should change interface methods as follows
> {code}
> boolean ITagLibRecognizer.isUsed(ELContext context);
> boolean ITagLibRecognizer.isUsed(IFile file);
> IHTMLLibraryVersion ITagLibVersionRecognizer.getVersion(ELContext context);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the jbosstools-issues mailing list