Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.configuration
Class ConfigurationsUtils

java.lang.Object
  extended by org.eclipse.mtj.core.model.configuration.ConfigurationsUtils

public class ConfigurationsUtils
extends Object

Provides Configuration related utils.


Constructor Summary
ConfigurationsUtils()
           
 
Method Summary
static boolean configsContentsEquals(Configurations cs1, Configurations cs2)
          The same as configurationsEuqals(Configurations, Configurations) , except ignore active configuration.
static boolean configurationsEuqals(Configurations cs1, Configurations cs2)
          Determine if two Configurations are totally equal.
static boolean isConfigsDirty(IMidletSuiteProject midletProject)
          If Configurations have any modification that not save to metadata file, return true.
static boolean isOnlyActiveConfigDirty(IMidletSuiteProject midletProject)
          If you only change active configuration(any other contents not change) and not save it to metadata file, return true.
static boolean workspaceSymbolsetsEquals(List<SymbolDefinitionSet> sets1, List<SymbolDefinitionSet> sets2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationsUtils

public ConfigurationsUtils()
Method Detail

configsContentsEquals

public static boolean configsContentsEquals(Configurations cs1,
                                            Configurations cs2)
The same as configurationsEuqals(Configurations, Configurations) , except ignore active configuration. This means, if two Configurations are same except that active configuration are different, also return true.

Parameters:
cs1 -
cs2 -
Returns:

configurationsEuqals

public static boolean configurationsEuqals(Configurations cs1,
                                           Configurations cs2)
Determine if two Configurations are totally equal.
If
1, two Configurations have same size and
2, both contains configuration with same name and
3, configuration with the same name have same device and same symbols,
this method will return true and
4, two Configurations have same active configuration.
In which same symbols means two SymbolSet have same size, and both have symbols with the same name, and symbols with the same name have same value.

Parameters:
cs1 -
cs2 -
Returns:

isConfigsDirty

public static boolean isConfigsDirty(IMidletSuiteProject midletProject)
If Configurations have any modification that not save to metadata file, return true.

Parameters:
midletProject -
Returns:

isOnlyActiveConfigDirty

public static boolean isOnlyActiveConfigDirty(IMidletSuiteProject midletProject)
If you only change active configuration(any other contents not change) and not save it to metadata file, return true.

Parameters:
midletProject -
Returns:

workspaceSymbolsetsEquals

public static boolean workspaceSymbolsetsEquals(List<SymbolDefinitionSet> sets1,
                                                List<SymbolDefinitionSet> sets2)

Mobile Tools for Java
Release 1.0