@Test public void testGetPath() { String path = "/this/is/the/path/to/file"; String parentPath = "/this/is/the"; String newPath = DialogUtils.getPath( parentPath, path ); assertEquals( "${Internal.Entry.Current.Directory}/path/to/file", newPath ); }
public static String getPath( String parentPath, String path ) { if ( !parentPath.equals( "/" ) && path.startsWith( parentPath ) ) { path = path.replace( parentPath, "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}" ); } return path; }
DialogUtils { public static String getPath( String parentPath, String path ) { if ( !parentPath.equals( "/" ) && path.startsWith( parentPath ) ) { path = path.replace( parentPath, "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}" ); } return path; } }
DialogUtils { public static String getPath( String parentPath, String path ) { if ( !parentPath.equals( "/" ) && path.startsWith( parentPath ) ) { path = path.replace( parentPath, "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}" ); } return path; }  }
DialogUtils { public static String getPath( String parentPath, String path ) { if ( !parentPath.equals( "/" ) && path.startsWith( parentPath ) ) { path = path.replace( parentPath, "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}" ); } return path; }  static String getPathOf( RepositoryElementMetaInterface object ); static boolean objectWithTheSameNameExists( SharedObjectInterface object,
      Collection<? extends SharedObjectInterface> scope ); static String getPath( String parentPath, String path ); }
DialogUtils { public static String getPath( String parentPath, String path ) { if ( !parentPath.equals( "/" ) && path.startsWith( parentPath ) ) { path = path.replace( parentPath, "${" + Const.INTERNAL_VARIABLE_ENTRY_CURRENT_DIRECTORY + "}" ); } return path; }  static String getPathOf( RepositoryElementMetaInterface object ); static boolean objectWithTheSameNameExists( SharedObjectInterface object,
      Collection<? extends SharedObjectInterface> scope ); static String getPath( String parentPath, String path );  }