public void deleteResources(final Set<String> searchTypes) {
synchronized (resourceMap) {
- if (null == resourceMap || resourceMap.isEmpty()) {
+ if (resourceMap.isEmpty()) {
return;
}
}
}
}
- class PostSelectionEditor extends EditingSupport {
+ private static class PostSelectionEditor extends EditingSupport {
private final TreeViewer viewer;
observeResButton.setEnabled(visibility);
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
@Override
public void dispose() {
}
}
- class AttributeLabelProvider implements ITableLabelProvider {
+ private static class AttributeLabelProvider implements ITableLabelProvider {
@Override
public void addListener(ILabelProviderListener arg0) {
import org.eclipse.ui.part.ViewPart;
import java.io.BufferedWriter;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStreamWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
String data = sb.toString();
BufferedWriter out = null;
try {
- out = new BufferedWriter(new FileWriter(name));
+ out = new BufferedWriter(new OutputStreamWriter(
+ new FileOutputStream(name), "UTF-8"));
out.write(data);
- } catch (IOException e) {
+ } catch (Exception e) {
e.printStackTrace();
MessageDialog.openError(
Display.getDefault().getActiveShell(),
devicePlatformInfoUIListener);
}
- class PropertycontentProvider implements IStructuredContentProvider {
+ private static class PropertycontentProvider implements
+ IStructuredContentProvider {
@Override
public void dispose() {
}
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
@Override
public void dispose() {
}
}
- class AttributeLabelProvider implements ITableLabelProvider {
+ private static class AttributeLabelProvider implements ITableLabelProvider {
@Override
public void addListener(ILabelProviderListener arg0) {
return (AttributeElement) item.getData();
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
@Override
public void dispose() {
}
}
- class AttributeLabelProvider implements ITableLabelProvider {
+ private static class AttributeLabelProvider implements ITableLabelProvider {
@Override
public void addListener(ILabelProviderListener arg0) {
return (AttributeElement) item.getData();
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
@Override
public void dispose() {
}
}
- class AttributeLabelProvider implements ITableLabelProvider {
+ private static class AttributeLabelProvider implements ITableLabelProvider {
@Override
public void addListener(ILabelProviderListener arg0) {
public class SerializedServiceProvider implements Serializable {
- public class SerializedAttribute implements Serializable {
+ public static class SerializedAttribute implements Serializable {
public String getName() {
return m_name;
private AttributeValueEditor attValueEditor;
private AutomationEditor automationEditor;
- class SyncValueUpdate {
+ private static class SyncValueUpdate {
private Boolean valueChangeInProgress;
public boolean isValueChangeInProgress() {
}
}
- class AutomationEditor extends EditingSupport {
+ private static class AutomationEditor extends EditingSupport {
private final TreeViewer viewer;
automationUIListener);
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
@Override
public void dispose() {
}
}
- class PropertycontentProvider implements IStructuredContentProvider {
+ private static class PropertycontentProvider implements
+ IStructuredContentProvider {
@Override
public void dispose() {
import org.eclipse.ui.part.ViewPart;
import java.io.BufferedWriter;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStreamWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.HashMap;
String data = sb.toString();
BufferedWriter out = null;
try {
- out = new BufferedWriter(new FileWriter(name));
+ out = new BufferedWriter(new OutputStreamWriter(
+ new FileOutputStream(name), "UTF-8"));
out.write(data);
- } catch (IOException e) {
+ } catch (Exception e) {
e.printStackTrace();
MessageDialog.openError(
Display.getDefault().getActiveShell(),
resourceSelectionChangedListener);
}
- class PropertycontentProvider implements IStructuredContentProvider {
+ private static class PropertycontentProvider implements
+ IStructuredContentProvider {
@Override
public void dispose() {
resourceObserverListChangedListener);
}
- class ObserverContentProvider implements IStructuredContentProvider {
+ private static class ObserverContentProvider implements
+ IStructuredContentProvider {
@Override
public void dispose() {
private Set<AttributeHelper> attributes;
- private final String defaultMessage = "Name, Type, and Default Value fields "
+ private static final String defaultMessage = "Name, Type, and Default Value fields "
+ "are mandatory.\n\nRange and custom fields allow to set the valid "
+ "values of the attribute.\n\n";
- private final String msgForBoolType = "Possible attribute values of Bool are "
+ private static final String msgForBoolType = "Possible attribute values of Bool are "
+ "true and false.\nSo range and custom options are disabled.";
- private final String msgForIntType = "Valid values for Int type can either be "
+ private static final String msgForIntType = "Valid values for Int type can either be "
+ "of range type (Ex: 1 - 10) or custom values (Ex: 10, 20, 50, and 100).\n";
- private final String msgForDoubleType = "Valid values for Double type can either be "
+ private static final String msgForDoubleType = "Valid values for Double type can either be "
+ "of range type (Ex: 18.0 - 22.0) or custom values (Ex: 1.5, 2.5, 3.9, 4.8, etc).\n";
- private final String msgForStringType = "For String type, range option is not"
+ private static final String msgForStringType = "For String type, range option is not"
+ "applicable. Hence it is disabled.\n\n"
+ "Custom option is available to provide the valid values.\n\n"
+ "Ex: low, mid, high, etc.";
}
}
- class TreeLabelProvider extends LabelProvider {
+ private static class TreeLabelProvider extends LabelProvider {
@Override
public String getText(Object element) {
if (element instanceof TreeViewContentHelper) {
}
}
- class TreeViewContentHelper {
+ private static class TreeViewContentHelper {
List<? extends Resource> resources;
public TreeViewContentHelper(List<? extends Resource> resources) {
}
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
@Override
public void dispose() {
}
}
- class AttributeLabelProvider implements ITableLabelProvider {
+ private static class AttributeLabelProvider implements ITableLabelProvider {
@Override
public void addListener(ILabelProviderListener arg0) {
});
}
- class AttributeContentProvider implements ITreeContentProvider {
+ private static class AttributeContentProvider implements
+ ITreeContentProvider {
List<AttributeHelper> attList = new ArrayList<AttributeHelper>();
/**
* Class which provides the value type information in detail.
*/
- public class TypeInfo {
+ public static class TypeInfo {
public ValueType mType;
public ValueType mBaseType;
public int mDepth;