forked from cnescatlab/i-CodeCNES
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cnescatlab#32 Adding of two new services to access languages &…
… checkers Also, using it in the analyzer
- Loading branch information
Omar Waldmann
committed
Jun 21, 2017
1 parent
d34a7d1
commit da3a7b6
Showing
9 changed files
with
588 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
...ools.analyzer/src/fr/cnes/analysis/tools/analyzer/services/checkers/CheckerContainer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
package fr.cnes.analysis.tools.analyzer.services.checkers; | ||
|
||
import fr.cnes.analysis.tools.analyzer.datas.AbstractChecker; | ||
import fr.cnes.analysis.tools.analyzer.services.languages.LanguageContainer; | ||
import java.util.List; | ||
import org.eclipse.core.runtime.IConfigurationElement; | ||
|
||
public class CheckerContainer { | ||
|
||
private String id; | ||
private String name; | ||
private LanguageContainer language; | ||
private AbstractChecker checker; | ||
|
||
public CheckerContainer(String pId, String pName, LanguageContainer pLanguage, AbstractChecker pChecker, | ||
IConfigurationElement pCheckerContribution) { | ||
this.id = pId; | ||
this.name = pName; | ||
this.language = pLanguage; | ||
this.checker = pChecker; | ||
this.checker.setContribution(pCheckerContribution); | ||
} | ||
|
||
public boolean canVerifyFormat(String format) { | ||
return this.language.getFileExtension().contains(format); | ||
} | ||
|
||
public List<String> getVerifiableFormat() { | ||
return this.language.getFileExtension(); | ||
} | ||
|
||
/** | ||
* @return the id | ||
*/ | ||
public final String getId() { | ||
return id; | ||
} | ||
|
||
/** | ||
* @param id | ||
* the id to set | ||
*/ | ||
protected final void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
/** | ||
* @return the name | ||
*/ | ||
public final String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* @param name | ||
* the name to set | ||
*/ | ||
protected final void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
/** | ||
* @return the language | ||
*/ | ||
public final LanguageContainer getLanguage() { | ||
return language; | ||
} | ||
|
||
/** | ||
* @param language | ||
* the language to set | ||
*/ | ||
protected final void setLanguage(LanguageContainer language) { | ||
this.language = language; | ||
} | ||
|
||
/** | ||
* @return the checker | ||
*/ | ||
public final AbstractChecker getChecker() { | ||
return checker; | ||
} | ||
|
||
/** | ||
* @param checker | ||
* the checker to set | ||
*/ | ||
protected final void setChecker(AbstractChecker checker) { | ||
this.checker = checker; | ||
} | ||
} |
Oops, something went wrong.