use of com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer in project liferay-ide by liferay.
the class IgnoreAlwaysAction method _storeIgnoredProblem.
private void _storeIgnoredProblem(Problem problem) {
try {
IgnoredProblemsContainer ipContainer = MigrationUtil.getIgnoredProblemsContainer();
if (ipContainer == null) {
ipContainer = new IgnoredProblemsContainer();
}
ipContainer.add(problem);
UpgradeAssistantSettingsUtil.setObjectToStore(IgnoredProblemsContainer.class, ipContainer);
} catch (IOException ioe) {
}
}
use of com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer in project liferay-ide by liferay.
the class MigrationProblemPreferencePage method _fillIgnoredProblemTable.
private void _fillIgnoredProblemTable() {
try {
IgnoredProblemsContainer mpContainer = UpgradeAssistantSettingsUtil.getObjectFromStore(IgnoredProblemsContainer.class);
if (mpContainer != null) {
Map<String, Problem> problemMap = mpContainer.getProblemMap();
Problem[] problems = problemMap.values().toArray(new Problem[0]);
_ignoredProblemTable.setInput(problems);
}
} catch (IOException ioe) {
ioe.printStackTrace();
}
}
use of com.liferay.ide.project.core.upgrade.IgnoredProblemsContainer in project liferay-ide by liferay.
the class MigrateProjectHandler method _shouldAdd.
private boolean _shouldAdd(Problem problem) {
IgnoredProblemsContainer ignoredProblemsContainer = MigrationUtil.getIgnoredProblemsContainer();
if (ignoredProblemsContainer != null) {
Set<String> ticketSet = ignoredProblemsContainer.getProblemMap().keySet();
if ((ticketSet != null) && ticketSet.contains(problem.getTicket())) {
final IResource resource = MigrationUtil.getIResourceFromProblem(problem);
final IMarker marker = resource.getMarker(problem.getMarkerId());
if (marker.exists()) {
try {
marker.delete();
} catch (CoreException ce) {
ProjectUI.logError(ce);
}
}
return false;
}
}
return true;
}
Aggregations