OODT-911 make code clearer
Project: http://git-wip-us.apache.org/repos/asf/oodt/repo Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/abd71645 Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/abd71645 Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/abd71645 Branch: refs/heads/master Commit: abd716458ce378f02210cd1ef9713cb125319458 Parents: d606af1 Author: Tom Barber <[email protected]> Authored: Sun Nov 1 00:30:44 2015 +0000 Committer: Tom Barber <[email protected]> Committed: Sun Nov 1 00:30:44 2015 +0000 ---------------------------------------------------------------------- .../browser/controller/TableListener.java | 3 +- .../oodt/cas/filemgr/browser/model/CasDB.java | 9 +- .../view/prompts/QueryBuilderPrompt.java | 12 +- .../oodt/cas/workflow/gui/WorkflowGUI.java | 23 +- .../oodt/cas/workflow/gui/model/ModelGraph.java | 90 ++++-- .../oodt/cas/workflow/gui/model/ModelNode.java | 38 ++- .../model/repo/XmlWorkflowModelRepository.java | 54 ++-- .../repo/XmlWorkflowModelRepositoryFactory.java | 6 +- .../gui/perspective/MultiStatePerspective.java | 3 +- .../workflow/gui/perspective/Perspective.java | 3 +- .../gui/perspective/build/BuildPerspective.java | 21 +- .../cas/workflow/gui/perspective/view/View.java | 6 +- .../gui/perspective/view/ViewState.java | 39 ++- .../perspective/view/impl/DefaultPropView.java | 76 +++-- .../perspective/view/impl/DefaultTreeView.java | 69 +++-- .../perspective/view/impl/GlobalConfigView.java | 9 +- .../gui/perspective/view/impl/GraphView.java | 158 ++++++---- .../perspective/view/impl/TreeProjectView.java | 18 +- .../oodt/cas/workflow/gui/toolbox/Tool.java | 5 +- .../oodt/cas/workflow/gui/toolbox/ToolBox.java | 6 +- .../oodt/cas/workflow/gui/util/GuiUtils.java | 112 ++++--- .../apache/oodt/cas/workflow/gui/util/Line.java | 15 +- .../catalog/cli/action/PagedQueryCliAction.java | 28 +- .../cas/catalog/cli/action/QueryCliAction.java | 16 +- .../cli/action/ReducedPagedQueryCliAction.java | 39 ++- .../cli/action/ReducedQueryCliAction.java | 26 +- .../catalog/mapping/DataSourceIngestMapper.java | 32 +- .../mapping/MemoryBasedIngestMapper.java | 111 +++---- .../oodt/cas/catalog/page/IndexPager.java | 5 +- .../apache/oodt/cas/catalog/page/PageInfo.java | 9 +- .../oodt/cas/catalog/page/QueryPager.java | 19 +- .../cas/catalog/page/TransactionReceipt.java | 9 +- .../query/ComparisonQueryExpression.java | 29 +- .../catalog/query/CustomQueryExpression.java | 9 +- .../catalog/query/FreeTextQueryExpression.java | 5 +- .../cas/catalog/query/QueryLogicalGroup.java | 5 +- .../time/MetadataTimeEventQueryFilter.java | 18 +- .../conv/AsciiSortableVersionConverter.java | 3 +- .../catalog/query/parser/ParseException.java | 4 +- .../query/parser/QueryParserTokenManager.java | 204 ++++++++----- .../catalog/query/parser/SimpleCharStream.java | 46 +-- .../repository/SerializedCatalogRepository.java | 30 +- .../XmlRpcCommunicationChannelClient.java | 5 +- .../XmlRpcCommunicationChannelServer.java | 9 +- .../oodt/cas/catalog/struct/TransactionId.java | 13 +- .../dictionary/WorkflowManagerDictionary.java | 10 +- .../struct/impl/index/DataSourceIndex.java | 120 +++++--- .../index/WorkflowManagerDataSourceIndex.java | 38 ++- .../apache/oodt/cas/catalog/system/Catalog.java | 78 +++-- .../oodt/cas/catalog/system/CatalogFactory.java | 5 +- .../impl/CatalogServiceClientFactory.java | 5 +- .../system/impl/CatalogServiceLocal.java | 305 ++++++++++++------- .../org/apache/oodt/cas/catalog/term/Term.java | 10 +- .../oodt/cas/catalog/term/TermBucket.java | 10 +- .../util/CasPropertyPlaceholderConfigurer.java | 9 +- .../cas/catalog/util/PluginClassLoader.java | 10 +- .../oodt/cas/catalog/util/Serializer.java | 9 +- .../oodt/cas/catalog/util/SpringUtils.java | 7 +- .../cas/cli/option/SimpleCmdLineOption.java | 3 +- .../apache/oodt/cas/cli/util/CmdLineUtils.java | 33 +- .../org/apache/oodt/commons/Configuration.java | 160 ++++++---- .../commons/ConfigurationEntityResolver.java | 5 +- .../org/apache/oodt/commons/ExecServer.java | 32 +- .../apache/oodt/commons/ExecServerConfig.java | 20 +- .../org/apache/oodt/commons/Executable.java | 5 +- .../org/apache/oodt/commons/MultiServer.java | 61 ++-- .../apache/oodt/commons/activity/Activity.java | 8 +- .../oodt/commons/activity/ActivityTracker.java | 13 +- .../commons/activity/CompositeActivity.java | 5 +- .../DatagramLoggingActivityFactory.java | 8 +- .../apache/oodt/commons/activity/History.java | 33 +- .../apache/oodt/commons/activity/Incident.java | 17 +- .../commons/activity/SQLDatabaseRetrieval.java | 8 +- .../apache/oodt/commons/database/SqlScript.java | 6 +- .../org/apache/oodt/commons/date/DateUtils.java | 6 +- .../apache/oodt/commons/exec/EnvUtilities.java | 12 +- .../apache/oodt/commons/exec/ExecHelper.java | 5 +- .../apache/oodt/commons/exec/StreamGobbler.java | 9 +- .../oodt/commons/filter/ObjectTimeEvent.java | 3 +- .../apache/oodt/commons/filter/TimeEvent.java | 3 +- .../commons/filter/TimeEventWeightedHash.java | 60 ++-- .../commons/io/Base64DecodingInputStream.java | 64 ++-- .../commons/io/Base64EncodingOutputStream.java | 48 +-- .../commons/io/FixedBufferOutputStream.java | 28 +- .../java/org/apache/oodt/commons/io/Log.java | 44 +-- .../org/apache/oodt/commons/io/LogFilter.java | 14 +- .../org/apache/oodt/commons/io/LogWriter.java | 33 +- .../apache/oodt/commons/io/NullInputStream.java | 4 +- .../oodt/commons/io/NullOutputStream.java | 17 +- .../apache/oodt/commons/io/WriterLogger.java | 17 +- .../oodt/commons/object/jndi/HTTPContext.java | 42 ++- .../oodt/commons/object/jndi/ObjectContext.java | 176 +++++++---- .../oodt/commons/object/jndi/RMIContext.java | 64 ++-- .../commons/pagination/PaginationUtils.java | 9 +- .../postprocessor/SetIdBeanPostProcessor.java | 5 +- .../org/apache/oodt/commons/util/Base64.java | 117 ++++--- .../org/apache/oodt/commons/util/CacheMap.java | 27 +- .../org/apache/oodt/commons/util/DOMParser.java | 5 +- .../commons/util/EnterpriseEntityResolver.java | 34 ++- .../org/apache/oodt/commons/util/JDBC_DB.java | 102 ++++--- .../org/apache/oodt/commons/util/LogInit.java | 10 +- .../apache/oodt/commons/util/MemoryLogger.java | 22 +- .../org/apache/oodt/commons/util/Utility.java | 26 +- .../java/org/apache/oodt/commons/util/XML.java | 63 ++-- .../org/apache/oodt/commons/util/XMLRPC.java | 63 ++-- .../org/apache/oodt/commons/xml/XMLUtils.java | 9 +- .../cas/crawl/MetExtractorProductCrawler.java | 15 +- .../oodt/cas/crawl/action/GroupAction.java | 7 +- .../cas/crawl/action/MimeTypeCrawlerAction.java | 3 +- .../apache/oodt/cas/crawl/action/MoveFile.java | 11 +- .../oodt/cas/crawl/action/ToggleAction.java | 3 +- .../handler/CrawlerActionInfoHandler.java | 7 +- .../cas/crawl/daemon/CrawlDaemonController.java | 3 +- .../crawl/typedetection/MetExtractorSpec.java | 6 +- .../MimeExtractorConfigReader.java | 21 +- .../crawl/typedetection/MimeExtractorRepo.java | 37 ++- .../cas/curation/service/IngestionResource.java | 3 +- .../cas/curation/service/MetadataResource.java | 15 +- .../curation/util/ExtractorConfigWriter.java | 3 +- .../apache/oodt/cas/curation/CurationApp.java | 6 +- .../cas/filemgr/catalog/DataSourceCatalog.java | 51 ++-- .../catalog/LenientDataSourceCatalog.java | 48 ++- .../oodt/cas/filemgr/catalog/LuceneCatalog.java | 24 +- .../catalog/MappedDataSourceCatalog.java | 3 +- .../catalog/solr/DefaultProductSerializer.java | 20 +- .../cas/filemgr/catalog/solr/SolrCatalog.java | 16 +- .../cas/filemgr/catalog/solr/SolrClient.java | 19 +- .../cli/action/IngestProductCliAction.java | 5 +- .../datatransfer/RemoteDataTransferer.java | 10 +- .../datatransfer/TransferStatusTracker.java | 3 +- .../oodt/cas/filemgr/ingest/LocalCache.java | 3 +- .../oodt/cas/filemgr/ingest/StdIngester.java | 6 +- .../examples/FinalFileLocationExtractor.java | 3 +- .../filemgr/structs/BooleanQueryCriteria.java | 10 +- .../filemgr/structs/FreeTextQueryCriteria.java | 3 +- .../oodt/cas/filemgr/structs/Product.java | 5 +- .../apache/oodt/cas/filemgr/structs/Query.java | 11 +- .../oodt/cas/filemgr/structs/Reference.java | 4 +- .../cas/filemgr/structs/query/ComplexQuery.java | 6 +- .../cas/filemgr/structs/query/QueryFilter.java | 6 +- .../cas/filemgr/structs/query/QueryResult.java | 44 ++- .../structs/query/QueryResultComparator.java | 9 +- .../conv/AsciiSortableVersionConverter.java | 3 +- .../structs/query/filter/ObjectTimeEvent.java | 3 +- .../filemgr/structs/query/filter/TimeEvent.java | 3 +- .../cas/filemgr/structs/type/TypeHandler.java | 9 +- .../structs/type/ValueReplaceTypeHandler.java | 9 +- .../cas/filemgr/system/XmlRpcFileManager.java | 62 ++-- .../filemgr/system/XmlRpcFileManagerClient.java | 14 +- .../oodt/cas/filemgr/system/auth/Result.java | 3 +- .../filemgr/system/auth/SecureWebServer.java | 5 +- .../oodt/cas/filemgr/tools/CatalogSearch.java | 3 +- .../oodt/cas/filemgr/tools/DeleteProduct.java | 3 +- .../oodt/cas/filemgr/tools/ExpImpCatalog.java | 41 +-- .../oodt/cas/filemgr/tools/MetadataDumper.java | 3 +- .../oodt/cas/filemgr/tools/ProductDumper.java | 3 +- .../oodt/cas/filemgr/tools/QueryTool.java | 29 +- .../cas/filemgr/tools/RangeQueryTester.java | 3 +- .../oodt/cas/filemgr/tools/SolrIndexer.java | 5 +- .../oodt/cas/filemgr/util/QueryUtils.java | 3 +- .../apache/oodt/cas/filemgr/util/SqlParser.java | 75 +++-- .../cas/filemgr/util/XmlRpcStructFactory.java | 48 +-- .../oodt/cas/filemgr/util/XmlStructFactory.java | 3 +- .../cas/filemgr/versioning/VersioningUtils.java | 18 +- .../java/org/apache/oodt/grid/ConfigBean.java | 6 +- .../org/apache/oodt/grid/ConfigServlet.java | 15 +- .../org/apache/oodt/grid/Configuration.java | 46 ++- .../java/org/apache/oodt/grid/GridServlet.java | 18 +- .../java/org/apache/oodt/grid/LoginServlet.java | 8 +- .../apache/oodt/grid/ProductQueryServlet.java | 26 +- .../java/org/apache/oodt/grid/QueryServlet.java | 42 ++- .../main/java/org/apache/oodt/grid/Server.java | 14 +- .../oodt/cas/metadata/AbstractMetExtractor.java | 3 +- .../org/apache/oodt/cas/metadata/Metadata.java | 103 ++++--- .../oodt/cas/metadata/SerializableMetadata.java | 17 +- .../metadata/extractors/ExternConfigReader.java | 25 +- .../metadata/extractors/ExternMetExtractor.java | 25 +- .../extractors/FilenameTokenConfig.java | 3 +- .../metadata/extractors/MetReaderExtractor.java | 11 +- .../preconditions/MimeTypeComparator.java | 7 +- .../preconditions/PreConditionComparator.java | 14 +- .../preconditions/RegExExcludeComparator.java | 5 +- .../oodt/cas/metadata/util/MimeTypeUtils.java | 12 +- .../oodt/cas/metadata/util/PathUtils.java | 43 +-- .../apache/oodt/opendapps/DatasetExtractor.java | 7 +- .../OpendapProfileElementExtractor.java | 12 +- .../oodt/opendapps/util/ProfileChecker.java | 24 +- .../oodt/opendapps/util/ProfileUtils.java | 4 +- .../apache/oodt/pcs/listing/ListingConf.java | 3 +- .../apache/oodt/pcs/pedigree/PedigreeTree.java | 3 +- .../oodt/pcs/pedigree/PedigreeTreeNode.java | 3 +- .../apache/oodt/pcs/query/AbstractPCSQuery.java | 3 +- .../apache/oodt/pcs/tools/PCSHealthMonitor.java | 3 +- .../oodt/pcs/util/WorkflowManagerUtils.java | 3 +- .../org/apache/oodt/pcs/input/PGEGroup.java | 24 +- .../oodt/pcs/services/HealthResource.java | 20 +- .../oodt/pcs/services/PedigreeResource.java | 6 +- .../apache/oodt/cas/pge/PGETaskInstance.java | 7 +- .../oodt/cas/pge/metadata/PgeMetadata.java | 3 +- .../org/apache/oodt/cas/pge/util/XmlHelper.java | 22 +- .../MetadataKeyReplacerTemplateWriter.java | 3 +- .../metlist/MetadataListPcsMetFileWriter.java | 20 +- .../handlers/ofsn/AbstractCrawlLister.java | 8 +- .../ofsn/OFSNFileHandlerConfiguration.java | 6 +- .../product/handlers/ofsn/URLGetHandler.java | 30 +- .../xmlquery/ChunkedProductInputStream.java | 54 ++-- .../org/apache/oodt/xmlquery/LargeResult.java | 27 +- .../oodt/profile/EnumeratedProfileElement.java | 9 +- .../java/org/apache/oodt/profile/Profile.java | 53 ++-- .../apache/oodt/profile/ProfileAttributes.java | 45 +-- .../org/apache/oodt/profile/ProfileElement.java | 112 ++++--- .../apache/oodt/profile/ResourceAttributes.java | 107 ++++--- .../java/org/apache/oodt/profile/Utility.java | 12 +- .../handlers/DatabaseProfileManager.java | 8 +- .../lightweight/ConstantExpression.java | 9 +- .../lightweight/LightweightProfileServer.java | 17 +- .../lightweight/OperatorExpression.java | 42 +-- .../SearchableEnumeratedProfileElement.java | 10 +- .../SearchableRangedProfileElement.java | 24 +- .../SearchableResourceAttributes.java | 137 +++++---- .../protocol/verify/BasicProtocolVerifier.java | 7 +- .../cas/protocol/ftp/CommonsNetFtpProtocol.java | 22 +- .../oodt/cas/protocol/http/HttpProtocol.java | 19 +- .../oodt/cas/protocol/http/util/HttpUtils.java | 5 +- .../oodt/cas/protocol/imaps/ImapsProtocol.java | 43 ++- .../protocol/imaps/ImapsProtocolFactory.java | 3 +- .../apache/oodt/cas/pushpull/config/Config.java | 3 +- .../oodt/cas/pushpull/config/DaemonInfo.java | 41 +-- .../oodt/cas/pushpull/config/PropFilesInfo.java | 9 +- .../oodt/cas/pushpull/config/ProtocolInfo.java | 9 +- .../oodt/cas/pushpull/config/RemoteSpecs.java | 24 +- .../oodt/cas/pushpull/config/SiteInfo.java | 31 +- .../apache/oodt/cas/pushpull/daemon/Daemon.java | 23 +- .../cas/pushpull/daemon/DaemonController.java | 3 +- .../cas/pushpull/daemon/DaemonLauncher.java | 13 +- .../oodt/cas/pushpull/daemon/DaemonManager.java | 5 +- .../oodt/cas/pushpull/expressions/Method.java | 24 +- .../filerestrictions/FileRestrictions.java | 10 +- .../pushpull/filerestrictions/VirtualFile.java | 41 ++- .../parsers/ClassNoaaEmailParser.java | 20 +- .../parsers/DirStructXmlParser.java | 28 +- .../renamingconventions/RenamingConvention.java | 6 +- .../cas/pushpull/protocol/ProtocolHandler.java | 50 +-- .../cas/pushpull/protocol/ProtocolPath.java | 6 +- .../pushpull/retrievalmethod/ListRetriever.java | 10 +- .../pushpull/retrievalmethod/RemoteCrawler.java | 21 +- .../DataFileToPropFileLinker.java | 36 ++- .../DownloadThreadEvaluator.java | 23 +- .../retrievalsystem/FileRetrievalSystem.java | 198 ++++++------ .../pushpull/retrievalsystem/RemoteFile.java | 8 +- .../retrievalsystem/RetrievalSetup.java | 15 +- .../resource/batchmgr/XmlRpcBatchMgrProxy.java | 9 +- .../cli/action/GetJobInfoCliAction.java | 3 +- .../cli/action/GetNodesInQueueCliAction.java | 3 +- .../resource/cli/action/GetQueuesCliAction.java | 5 +- .../cli/action/GetQueuesWithNodeCliAction.java | 3 +- .../oodt/cas/resource/jobqueue/JobStack.java | 5 +- .../resource/jobrepo/MemoryJobRepository.java | 3 +- .../resource/jobrepo/XStreamJobRepository.java | 15 +- .../jobrepo/XStreamJobRepositoryFactory.java | 14 +- .../cas/resource/monitor/AssignmentMonitor.java | 6 +- .../monitor/ganglia/GangliaResourceMonitor.java | 4 +- .../resource/mux/StandardBackendManager.java | 9 +- .../cas/resource/mux/XmlBackendRepository.java | 6 +- .../cas/resource/scheduler/QueueManager.java | 46 +-- .../resource/system/XmlRpcResourceManager.java | 11 +- .../system/XmlRpcResourceManagerClient.java | 4 +- .../resource/system/extern/XmlRpcBatchStub.java | 9 +- .../cas/resource/tools/RunDirJobSubmitter.java | 3 +- .../oodt/cas/resource/util/UlimitProperty.java | 3 +- .../apache/oodt/security/sso/OpenSSOImpl.java | 6 +- .../oodt/security/sso/opensso/SSOProxy.java | 3 +- .../instance/WorkflowInstancesViewer.java | 5 +- .../workflow/model/WorkflowViewer.java | 5 +- .../health/VisibilityAndSortToggler.java | 6 +- .../cas/product/data/DataDeliveryServlet.java | 12 +- .../apache/oodt/cas/product/data/DataUtils.java | 23 +- .../product/data/DatasetDeliveryServlet.java | 3 +- .../oodt/cas/product/rdf/ProductTypeFilter.java | 11 +- .../apache/oodt/cas/product/rdf/RDFConfig.java | 6 +- .../cli/action/GetWorkflowByIdCliAction.java | 4 +- .../action/GetWorkflowsByEventCliAction.java | 4 +- .../oodt/cas/workflow/engine/TaskQuerier.java | 6 +- .../engine/ThreadPoolWorkflowEngine.java | 3 +- .../engine/processor/SequentialProcessor.java | 11 +- .../engine/processor/TaskProcessor.java | 3 +- .../engine/processor/WorkflowProcessor.java | 14 +- .../processor/WorkflowProcessorBuilder.java | 9 +- .../processor/WorkflowProcessorHelper.java | 78 +++-- .../processor/WorkflowProcessorQueue.java | 7 +- .../engine/runner/AbstractEngineRunnerBase.java | 9 +- .../runner/AsynchronousLocalEngineRunner.java | 3 +- .../workflow/engine/runner/ResourceRunner.java | 6 +- .../workflow/examples/CheckForMetadataKeys.java | 5 +- .../cas/workflow/examples/LongCondition.java | 4 +- .../workflow/lifecycle/WorkflowLifecycle.java | 6 +- .../lifecycle/WorkflowLifecycleManager.java | 15 +- .../cas/workflow/lifecycle/WorkflowState.java | 9 +- .../DataSourceWorkflowRepository.java | 6 +- .../repository/PackagedWorkflowRepository.java | 31 +- .../repository/XMLWorkflowRepository.java | 13 +- .../apache/oodt/cas/workflow/structs/Graph.java | 5 +- .../oodt/cas/workflow/structs/Priority.java | 18 +- .../oodt/cas/workflow/structs/TaskJobInput.java | 9 +- .../cas/workflow/structs/WorkflowInstance.java | 7 +- .../workflow/system/XmlRpcWorkflowManager.java | 93 +++--- .../system/XmlRpcWorkflowManagerClient.java | 13 +- .../oodt/cas/workflow/util/DbStructFactory.java | 6 +- .../util/GenericWorkflowObjectFactory.java | 36 ++- .../cas/workflow/util/XmlStructFactory.java | 20 +- .../apache/oodt/xmlps/mapping/MappingField.java | 6 +- .../oodt/xmlps/mapping/MappingReader.java | 6 +- .../oodt/xmlps/product/XMLPSProductHandler.java | 12 +- .../xmlps/queryparser/HandlerQueryParser.java | 12 +- .../oodt/xmlps/queryparser/WildcardLiteral.java | 4 +- .../apache/oodt/xmlps/structs/CDEResult.java | 16 +- .../xmlps/structs/CDEResultInputStream.java | 18 +- .../apache/oodt/xmlquery/ByteArrayCodec.java | 13 +- .../org/apache/oodt/xmlquery/CodecFactory.java | 10 +- .../oodt/xmlquery/CompressedObjectCodec.java | 9 +- .../oodt/xmlquery/CompressedStringCodec.java | 14 +- .../java/org/apache/oodt/xmlquery/Header.java | 33 +- .../org/apache/oodt/xmlquery/ObjectCodec.java | 9 +- .../org/apache/oodt/xmlquery/QueryElement.java | 32 +- .../org/apache/oodt/xmlquery/QueryHeader.java | 56 ++-- .../org/apache/oodt/xmlquery/QueryResult.java | 16 +- .../java/org/apache/oodt/xmlquery/Result.java | 82 +++-- .../org/apache/oodt/xmlquery/Statistic.java | 11 +- .../java/org/apache/oodt/xmlquery/XMLQuery.java | 55 +++- 329 files changed, 4771 insertions(+), 2836 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java ---------------------------------------------------------------------- diff --git a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java index 3e86b7a..81ac61f 100644 --- a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java +++ b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/controller/TableListener.java @@ -120,8 +120,9 @@ public class TableListener implements MouseListener, ActionListener { // write out excel file String fullFileName = (fc.getSelectedFile()).getAbsolutePath(); - if (!fullFileName.endsWith(".xls")) + if (!fullFileName.endsWith(".xls")) { fullFileName += ".xls"; + } HSSFWorkbook wb = new HSSFWorkbook(); HSSFSheet sheet = wb.createSheet("results"); http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java ---------------------------------------------------------------------- diff --git a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java index 5359941..badd8c8 100644 --- a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java +++ b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java @@ -116,8 +116,9 @@ public class CasDB { ProductType type = client.getProductTypeByName(productType); Vector<Product> products = (Vector<Product>) client.query(query, type); int maxVal = 20; - if (products.size() < maxVal) + if (products.size() < maxVal) { maxVal = products.size(); + } for (int i = 0; i < maxVal; i++) { Metadata m = client.getMetadata(products.get(i)); results.addProduct(m); @@ -140,8 +141,9 @@ public class CasDB { .getProductsByProductType(type); // for(int i=0;i<products.size();i++){ int maxVal = 20; - if (products.size() < maxVal) + if (products.size() < maxVal) { maxVal = products.size(); + } for (int i = 0; i < maxVal; i++) { Metadata m = client.getMetadata(products.get(i)); results.addProduct(m); @@ -159,8 +161,9 @@ public class CasDB { type = client.getProductTypeByName(productType); Vector<Product> products = (Vector<Product>) client.query(casQ, type); int maxVal = 20; - if (products.size() < maxVal) + if (products.size() < maxVal) { maxVal = products.size(); + } for (int i = 0; i < maxVal; i++) { Metadata m = client.getMetadata(products.get(i)); results.addProduct(m); http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/QueryBuilderPrompt.java ---------------------------------------------------------------------- diff --git a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/QueryBuilderPrompt.java b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/QueryBuilderPrompt.java index b030ee6..49ab623 100644 --- a/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/QueryBuilderPrompt.java +++ b/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/view/prompts/QueryBuilderPrompt.java @@ -257,21 +257,25 @@ public class QueryBuilderPrompt extends JFrame { public void actionPerformed(ActionEvent arg0) { if (arg0.getActionCommand().equals("Add Term Criteria")) { TermQueryPanel tq = new TermQueryPanel(prompt); - if (this.getComponentCount() > 1) + if (this.getComponentCount() > 1) { tq.addOp(); + } int insertOrder = this.getComponentCount() - 1; - if (insertOrder < 0) + if (insertOrder < 0) { insertOrder = 0; + } this.add(tq, insertOrder); this.validate(); prompt.scrollPane.validate(); } else if (arg0.getActionCommand().equals("Add Range Criteria")) { RangeQueryPanel rq = new RangeQueryPanel(prompt); - if (this.getComponentCount() > 1) + if (this.getComponentCount() > 1) { rq.addOp(); + } int insertOrder = this.getComponentCount() - 1; - if (insertOrder < 0) + if (insertOrder < 0) { insertOrder = 0; + } this.add(rq, insertOrder); this.validate(); prompt.scrollPane.validate(); http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java index 13ba5f0..85ed681 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/WorkflowGUI.java @@ -80,12 +80,15 @@ public class WorkflowGUI extends JFrame { this.addWindowFocusListener(new WindowFocusListener() { public void windowGainedFocus(WindowEvent e) { - if (menu != null) + if (menu != null) { menu.revalidate(); - if (toolbox != null) + } + if (toolbox != null) { toolbox.revalidate(); - if (perspective != null) + } + if (perspective != null) { perspective.refresh(); + } } public void windowLostFocus(WindowEvent e) { @@ -158,10 +161,11 @@ public class WorkflowGUI extends JFrame { } private void updateWorkspaceText() { - if (this.workspace == null) + if (this.workspace == null) { this.setTitle(null); - else + } else { this.setTitle(StringUtils.leftPad("Workspace: " + this.workspace, 100)); + } } private void loadProjects() { @@ -173,9 +177,11 @@ public class WorkflowGUI extends JFrame { "parallel", "task", "condition"))); for (File file : repo.getFiles()) { List<ModelGraph> graphs = new Vector<ModelGraph>(); - for (ModelGraph graph : repo.getGraphs()) - if (graph.getModel().getFile().equals(file)) + for (ModelGraph graph : repo.getGraphs()) { + if (graph.getModel().getFile().equals(file)) { graphs.add(graph); + } + } System.out.println(graphs); perspective.addState(new ViewState(file, null, graphs, repo .getGlobalConfigGroups())); @@ -222,8 +228,9 @@ public class WorkflowGUI extends JFrame { public void actionPerformed(ActionEvent event) { try { - if (workspace == null) + if (workspace == null) { return; + } JFileChooser chooser = new JFileChooser(new File(".")); int value = chooser.showOpenDialog(WorkflowGUI.this); if (value == JFileChooser.APPROVE_OPTION) { http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelGraph.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelGraph.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelGraph.java index 6801340..3305763 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelGraph.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelGraph.java @@ -50,8 +50,9 @@ public class ModelGraph { this.isPreCondition = isPostCondition = false; this.model = model; this.children = new Vector<ModelGraph>(); - if (this.model.isParentType()) + if (this.model.isParentType()) { this.addChild(new ModelGraph(GuiUtils.createDummyNode())); + } } public void setIsRef(boolean isRef) { @@ -61,10 +62,12 @@ public class ModelGraph { ModelGraph curGraph = stack.pop(); curGraph.getModel().setIsRef(isRef); stack.addAll(curGraph.getChildren()); - if (curGraph.getPreConditions() != null) + if (curGraph.getPreConditions() != null) { stack.add(curGraph.getPreConditions()); - if (curGraph.getPostConditions() != null) + } + if (curGraph.getPostConditions() != null) { stack.add(curGraph.getPostConditions()); + } } } @@ -85,17 +88,19 @@ public class ModelGraph { public void setParent(ModelGraph parent) { if (this.parent != null) { if (this.isCondition() && !this.parent.isCondition()) { - if (this.isPreCondition) + if (this.isPreCondition) { this.parent.preConditions = null; - else + } else { this.parent.postConditions = null; + } } else { this.parent.removeChild(this); } } this.parent = parent; - if (!this.getModel().isRef() && parent != null && parent.getModel().isRef()) + if (!this.getModel().isRef() && parent != null && parent.getModel().isRef()) { this.getModel().setIsRef(true); + } } public ModelGraph getParent() { @@ -103,10 +108,11 @@ public class ModelGraph { } public ModelGraph getRootParent() { - if (this.parent == null) + if (this.parent == null) { return this; - else + } else { return this.parent.getRootParent(); + } } public List<ModelGraph> getPathFromRootParent() { @@ -121,8 +127,9 @@ public class ModelGraph { public void addChild(ModelGraph graph) { if (this.children.size() == 1 - && GuiUtils.isDummyNode(this.children.get(0).getModel())) + && GuiUtils.isDummyNode(this.children.get(0).getModel())) { this.children.clear(); + } this.children.add(graph); graph.setParent(this); } @@ -132,22 +139,25 @@ public class ModelGraph { this.getModel().getExcusedSubProcessorIds() .remove(graph.getModel().getModelId()); graph.parent = null; - if (this.children.size() == 0) + if (this.children.size() == 0) { this.addChild(new ModelGraph(GuiUtils.createDummyNode())); + } } public List<ModelGraph> getChildren() { - if (this.getModel().isParentType() && children.size() == 0) + if (this.getModel().isParentType() && children.size() == 0) { this.addChild(new ModelGraph(GuiUtils.createDummyNode())); + } return children; } public boolean hasChildren() { if (this.children.size() == 1 - && GuiUtils.isDummyNode(this.children.get(0).getModel())) + && GuiUtils.isDummyNode(this.children.get(0).getModel())) { return false; - else + } else { return this.children.size() > 0; + } } public ModelNode getModel() { @@ -162,12 +172,15 @@ public class ModelGraph { Metadata m = new Metadata(); if (this.parent != null) { m.replaceMetadata(this.parent.getInheritedStaticMetadata(state)); - if (this.parent.getModel().getStaticMetadata() != null) + if (this.parent.getModel().getStaticMetadata() != null) { m.replaceMetadata(this.parent.getModel().getStaticMetadata()); - if (this.parent.getModel().getExtendsConfig() != null) - for (String configGroup : this.parent.getModel().getExtendsConfig()) + } + if (this.parent.getModel().getExtendsConfig() != null) { + for (String configGroup : this.parent.getModel().getExtendsConfig()) { m.replaceMetadata(state.getGlobalConfigGroups().get(configGroup) - .getMetadata()); + .getMetadata()); + } + } } return m; } @@ -177,8 +190,9 @@ public class ModelGraph { } public void setPreConditions(ModelGraph preConditions) { - if (this.preConditions != null) + if (this.preConditions != null) { this.preConditions.setParent(null); + } Stack<ModelGraph> stack = new Stack<ModelGraph>(); stack.add(preConditions); while (!stack.empty()) { @@ -194,8 +208,9 @@ public class ModelGraph { } public void setPostConditions(ModelGraph postConditions) { - if (this.postConditions != null) + if (this.postConditions != null) { this.postConditions.setParent(null); + } Stack<ModelGraph> stack = new Stack<ModelGraph>(); stack.add(postConditions); while (!stack.empty()) { @@ -211,13 +226,16 @@ public class ModelGraph { stack.add(this); while (!stack.empty()) { ModelGraph curGraph = stack.pop(); - if (curGraph.getId().equals(id)) + if (curGraph.getId().equals(id)) { return curGraph; + } stack.addAll(curGraph.getChildren()); - if (curGraph.getPreConditions() != null) + if (curGraph.getPreConditions() != null) { stack.add(curGraph.getPreConditions()); - if (curGraph.getPostConditions() != null) + } + if (curGraph.getPostConditions() != null) { stack.add(curGraph.getPostConditions()); + } } return null; } @@ -227,13 +245,16 @@ public class ModelGraph { stack.add(this); while (!stack.empty()) { ModelGraph curGraph = stack.pop(); - if (curGraph.getModel().getModelId().equals(modelId)) + if (curGraph.getModel().getModelId().equals(modelId)) { return curGraph; + } stack.addAll(curGraph.getChildren()); - if (curGraph.getPreConditions() != null) + if (curGraph.getPreConditions() != null) { stack.add(curGraph.getPreConditions()); - if (curGraph.getPostConditions() != null) + } + if (curGraph.getPostConditions() != null) { stack.add(curGraph.getPostConditions()); + } } return null; } @@ -244,10 +265,11 @@ public class ModelGraph { stack.add(this); while (!stack.empty()) { ModelGraph curGraph = stack.pop(); - if (curGraph.getChildren().size() == 0) + if (curGraph.getChildren().size() == 0) { leafNodes.add(curGraph); - else + } else { stack.addAll(curGraph.getChildren()); + } } return leafNodes; } @@ -257,10 +279,11 @@ public class ModelGraph { } public boolean equals(Object obj) { - if (obj instanceof ModelGraph) + if (obj instanceof ModelGraph) { return this.getId().equals(((ModelGraph) obj).getId()); - else + } else { return false; + } } public String toString() { @@ -270,12 +293,15 @@ public class ModelGraph { public ModelGraph clone() { ModelNode cloneNode = this.model.clone(); ModelGraph clone = new ModelGraph(cloneNode); - for (ModelGraph child : this.children) + for (ModelGraph child : this.children) { clone.addChild(child.clone()); - if (this.preConditions != null) + } + if (this.preConditions != null) { clone.setPreConditions(this.preConditions.clone()); - if (this.postConditions != null) + } + if (this.postConditions != null) { clone.setPostConditions(this.postConditions.clone()); + } return clone; } } http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelNode.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelNode.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelNode.java index 14283e8..20a4562 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelNode.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/ModelNode.java @@ -135,28 +135,31 @@ public class ModelNode { public Color getColor() { if (this.isParentType()) { - if (this.getExecutionType().equals("sequential")) + if (this.getExecutionType().equals("sequential")) { return new Color(100, 149, 237); - else if (this.getExecutionType().equals("parallel")) + } else if (this.getExecutionType().equals("parallel")) { return new Color(143, 188, 143); - else + } else { return Color.darkGray; + } } else { - if (this.getExecutionType().equals("task")) + if (this.getExecutionType().equals("task")) { return Color.orange; - else + } else { return Color.cyan; + } } } public Color getGradientColor() { if (this.isParentType()) { - if (this.getExecutionType().equals("sequential")) + if (this.getExecutionType().equals("sequential")) { return new Color(200, 200, 200); - else if (this.getExecutionType().equals("parallel")) + } else if (this.getExecutionType().equals("parallel")) { return new Color(200, 200, 200); - else + } else { return Color.white; + } } else { return Color.darkGray; } @@ -183,8 +186,9 @@ public class ModelNode { } public List<String> getExcusedSubProcessorIds() { - if (this.excusedSubProcessorIds == null) + if (this.excusedSubProcessorIds == null) { this.excusedSubProcessorIds = new Vector<String>(); + } return this.excusedSubProcessorIds; } @@ -198,18 +202,20 @@ public class ModelNode { } public boolean equals(Object obj) { - if (obj instanceof ModelNode) + if (obj instanceof ModelNode) { return this.getId().equals(((ModelNode) obj).getId()); - else + } else { return false; + } } public String toString() { if (this.textVisible) { - if (this.isParentType()) + if (this.isParentType()) { return this.getModelName() + " : " + this.getExecutionType(); - else + } else { return this.getModelName(); + } } else { return null; } @@ -218,17 +224,19 @@ public class ModelNode { public ModelNode clone() { ModelNode clone = new ModelNode(this.file); clone.id = this.id; - if (this.excusedSubProcessorIds != null) + if (this.excusedSubProcessorIds != null) { clone.excusedSubProcessorIds = new Vector<String>( this.excusedSubProcessorIds); + } clone.executionType = this.executionType; clone.instanceClass = this.instanceClass; clone.modelId = this.modelId; clone.modelName = this.modelName; clone.staticMetadata = null; clone.textVisible = this.textVisible; - if (this.staticMetadata != null) + if (this.staticMetadata != null) { clone.staticMetadata = new Metadata(this.staticMetadata); + } return clone; } http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java index e43a305..1976369 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepository.java @@ -78,9 +78,11 @@ public class XmlWorkflowModelRepository { public XmlWorkflowModelRepository(File workspace) { this.files = new Vector<File>(); - for (File file : (this.workspace = workspace).listFiles()) - if (!file.isDirectory()) + for (File file : (this.workspace = workspace).listFiles()) { + if (!file.isDirectory()) { this.files.add(file); + } + } } public void loadGraphs(Set<String> supportedProcessorIds) @@ -99,17 +101,18 @@ public class XmlWorkflowModelRepository { for (FileBasedElement root : rootElements) { loadConfiguration(rootElements, root, null, globalConfGroups); NodeList rootChildren = root.getElement().getChildNodes(); - for (int i = 0; i < rootChildren.getLength(); i++) + for (int i = 0; i < rootChildren.getLength(); i++) { if (rootChildren.item(i).getNodeType() == Node.ELEMENT_NODE && !rootChildren.item(i).getNodeName().equals("configuration") && !rootChildren.item(i).getNodeName().equals("event")) { System.out.println("node name: [" - + rootChildren.item(i).getNodeName() + "]"); + + rootChildren.item(i).getNodeName() + "]"); ModelGraph graph = this.loadGraph(rootElements, new FileBasedElement( - root.getFile(), (Element) rootChildren.item(i)), new Metadata(), + root.getFile(), (Element) rootChildren.item(i)), new Metadata(), globalConfGroups, supportedProcessorIds); this.graphs.add(graph); } + } } ensureUniqueIds(graphs); this.globalConfigGroups = globalConfGroups; @@ -302,11 +305,13 @@ public class XmlWorkflowModelRepository { while (!stack.isEmpty()) { ModelGraph currentGraph = stack.remove(0); String currentId = currentGraph.getId(); - for (int i = 1; names.contains(currentId); i++) + for (int i = 1; names.contains(currentId); i++) { currentId = currentGraph.getId() + "-" + i; + } names.add(currentId); - if (!currentId.equals(currentGraph.getId())) + if (!currentId.equals(currentGraph.getId())) { currentGraph.getModel().setModelId(currentId); + } stack.addAll(currentGraph.getChildren()); } } @@ -361,8 +366,9 @@ public class XmlWorkflowModelRepository { } } - if (modelId == null && modelIdRef == null) + if (modelId == null && modelIdRef == null) { modelId = UUID.randomUUID().toString(); + } ModelGraph graph = null; if (modelId != null) { @@ -380,9 +386,10 @@ public class XmlWorkflowModelRepository { executionType = workflowNode.getElement().getNodeName(); } - if (!supportedProcessorIds.contains(executionType)) + if (!supportedProcessorIds.contains(executionType)) { LOG.log(Level.WARNING, "Unsupported execution type id '" - + executionType + "'"); + + executionType + "'"); + } ModelNode modelNode = new ModelNode(workflowNode.getFile()); modelNode.setModelId(modelId); @@ -407,18 +414,20 @@ public class XmlWorkflowModelRepository { if (curChild.getNodeName().equals("conditions")) { boolean isPreCondition = !loadedPreConditions; String type = ((Element) curChild).getAttribute("type"); - if (type.length() > 0) + if (type.length() > 0) { isPreCondition = type.toLowerCase().equals("pre"); - if (isPreCondition) + } + if (isPreCondition) { graph.setPreConditions(this.loadGraph(rootElements, new FileBasedElement(workflowNode.getFile(), (Element) curChild), new Metadata(staticMetadata), globalConfGroups, supportedProcessorIds)); - else + } else { graph.setPostConditions(this.loadGraph(rootElements, new FileBasedElement(workflowNode.getFile(), (Element) curChild), new Metadata(staticMetadata), globalConfGroups, supportedProcessorIds)); + } loadedPreConditions = true; } else if (!curChild.getNodeName().equals("configuration") && !curChild.getNodeName().equals("requiredMetFields")) { @@ -433,9 +442,10 @@ public class XmlWorkflowModelRepository { } else if (modelIdRef != null) { graph = this.findGraph(rootElements, modelIdRef, new Metadata( staticMetadata), globalConfGroups, supportedProcessorIds); - if (graph == null) + if (graph == null) { throw new WorkflowException("Workflow '" + modelIdRef - + "' has not been defined in this context"); + + "' has not been defined in this context"); + } graph.setIsRef(true); graph.getModel().setStaticMetadata(new Metadata()); loadConfiguration(rootElements, workflowNode, graph.getModel(), @@ -477,9 +487,10 @@ public class XmlWorkflowModelRepository { if (curChild.getNodeName().equals("configuration")) { Metadata curMetadata = new Metadata(); if (modelNode != null - && !((Element) curChild).getAttribute("extends").equals("")) + && !((Element) curChild).getAttribute("extends").equals("")) { modelNode.setExtendsConfig(Arrays.asList(((Element) curChild) .getAttribute("extends").split(","))); + } curMetadata.replaceMetadata(this.loadConfiguration(rootElements, curChild, globalConfGroups)); if (!((Element) curChild).getAttribute("name").equals("")) { @@ -512,13 +523,15 @@ public class XmlWorkflowModelRepository { String envReplace = property.getAttribute("envReplace"); String name = property.getAttribute("name"); String value = property.getAttribute("value"); - if (Boolean.parseBoolean(envReplace)) + if (Boolean.parseBoolean(envReplace)) { curMetadata.replaceMetadata(name + "/envReplace", "true"); + } List<String> values = new Vector<String>(); - if (delim.length() > 0) + if (delim.length() > 0) { values.addAll(Arrays.asList(value.split("\\" + delim))); - else + } else { values.add(value); + } curMetadata.replaceMetadata(name, values); } } @@ -589,8 +602,9 @@ public class XmlWorkflowModelRepository { if (obj instanceof ConfigGroup) { ConfigGroup comp = (ConfigGroup) obj; return comp.name.equals(this.name); - } else + } else { return false; + } } public String toString() { http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepositoryFactory.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepositoryFactory.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepositoryFactory.java index 704b071..8cf683f 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepositoryFactory.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/model/repo/XmlWorkflowModelRepositoryFactory.java @@ -33,10 +33,12 @@ public class XmlWorkflowModelRepositoryFactory { private String workspace; public XmlWorkflowModelRepository createModelRepository() { - if (workspace == null) + if (workspace == null) { return null; - if (!new File(workspace).exists()) + } + if (!new File(workspace).exists()) { new File(workspace).mkdirs(); + } return new XmlWorkflowModelRepository(new File(workspace)); } http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/MultiStatePerspective.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/MultiStatePerspective.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/MultiStatePerspective.java index b55f7f5..5503c6b 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/MultiStatePerspective.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/MultiStatePerspective.java @@ -82,8 +82,9 @@ public abstract class MultiStatePerspective extends Perspective { public void setMode(Mode mode) { this.mode = mode; - for (ViewState state : states.values()) + for (ViewState state : states.values()) { state.setMode(mode); + } this.refresh(); } http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/Perspective.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/Perspective.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/Perspective.java index c19eda0..0df667a 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/Perspective.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/Perspective.java @@ -64,8 +64,9 @@ public abstract class Perspective extends JPanel implements ViewListener { } public void save() { - if (this.state != null) + if (this.state != null) { this.state.save(); + } } public void undo() { http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/build/BuildPerspective.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/build/BuildPerspective.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/build/BuildPerspective.java index 3209a3b..b73fe3b 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/build/BuildPerspective.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/build/BuildPerspective.java @@ -148,10 +148,11 @@ public class BuildPerspective extends MultiStatePerspective { } public View getActiveView() { - if (this.getActiveState() != null) + if (this.getActiveState() != null) { return this.stateViews.get(this.getActiveState()).getActiveView(); - else + } else { return null; + } } @Override @@ -165,10 +166,11 @@ public class BuildPerspective extends MultiStatePerspective { @Override public void handleRemoveState(ViewState state) { this.stateViews.remove(state); - if (this.stateViews.size() > 0) + if (this.stateViews.size() > 0) { this.activeState = this.stateViews.keySet().iterator().next(); - else + } else { this.activeState = null; + } this.refresh(); } @@ -186,11 +188,12 @@ public class BuildPerspective extends MultiStatePerspective { panel = new JPanel(); } - if (this.projectView instanceof MultiStateView) + if (this.projectView instanceof MultiStateView) { ((MultiStateView) this.projectView).refreshView(this.activeState, this.getStates()); - else + } else { this.projectView.refreshView(this.activeState); + } this.globalConfigView.refreshView(this.activeState); @@ -200,12 +203,14 @@ public class BuildPerspective extends MultiStatePerspective { globalPanel.add(this.globalConfigView, BorderLayout.SOUTH); int dividerLocation = -1; - if (projectSplitPane != null) + if (projectSplitPane != null) { dividerLocation = projectSplitPane.getDividerLocation(); + } projectSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, globalPanel, panel); - if (dividerLocation != -1) + if (dividerLocation != -1) { projectSplitPane.setDividerLocation(dividerLocation); + } this.add(projectSplitPane, BorderLayout.CENTER); this.revalidate(); http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/View.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/View.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/View.java index 4f6c35d..b8341e1 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/View.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/View.java @@ -48,8 +48,9 @@ public abstract class View extends JPanel { public View(String name) { super(); this.id = UUID.randomUUID().toString(); - if (name != null) + if (name != null) { this.setName(name); + } this.listeners = new Vector<ViewListener>(); } @@ -74,8 +75,9 @@ public abstract class View extends JPanel { } public void notifyListeners(ViewChange<?> change) { - for (ViewListener listener : listeners) + for (ViewListener listener : listeners) { listener.stateChangeNotify(change); + } } public void notifyListeners() { http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/ViewState.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/ViewState.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/ViewState.java index 1513b7e..ff863fc 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/ViewState.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/ViewState.java @@ -106,8 +106,9 @@ public class ViewState { public String getFirstPropertyValue(String key) { List<String> values = this.getProperty(key); - if (values == null || values.size() == 0) + if (values == null || values.size() == 0) { return null; + } return values.get(0); } @@ -122,9 +123,11 @@ public class ViewState { public List<String> getKeysRecur(String subGroup) { Vector<String> keys = new Vector<String>(); - for (String key : this.properties.getAllKeys()) - if (key.contains(subGroup)) + for (String key : this.properties.getAllKeys()) { + if (key.contains(subGroup)) { keys.add(key); + } + } return keys; } @@ -138,16 +141,18 @@ public class ViewState { } public ModelGraph getSelected() { - if (this.mode.equals(Mode.EDIT)) + if (this.mode.equals(Mode.EDIT)) { return this.selected; - else + } else { return null; + } } public Set<String> getGraphIds() { HashSet<String> graphIds = new HashSet<String>(); - for (ModelGraph graph : this.getGraphs()) + for (ModelGraph graph : this.getGraphs()) { graphIds.add(graph.getModel().getModelId()); + } return graphIds; } @@ -188,10 +193,12 @@ public class ViewState { public void save() { if (this.change) { Stack<ViewState> stack = undoHistory.get(this.id); - if (stack == null) + if (stack == null) { stack = new Stack<ViewState>(); - if (stack.size() >= 100) + } + if (stack.size() >= 100) { stack.remove(stack.size() - 1); + } stack.push(this.clone()); undoHistory.put(this.id, stack); this.change = false; @@ -212,11 +219,13 @@ public class ViewState { this.selected = null; if (state.graphs != null) { this.graphs = new Vector<ModelGraph>(); - for (ModelGraph graph : state.graphs) + for (ModelGraph graph : state.graphs) { this.graphs.add(graph.clone()); - if (state.selected != null) + } + if (state.selected != null) { this.selected = GuiUtils.find(this.graphs, state.selected.getModel() - .getModelId()); + .getModelId()); + } } this.properties = new Metadata(state.properties); this.id = state.id; @@ -229,11 +238,13 @@ public class ViewState { ModelGraph selected = null; if (this.graphs != null) { cloneGraphs = new Vector<ModelGraph>(); - for (ModelGraph graph : this.graphs) + for (ModelGraph graph : this.graphs) { cloneGraphs.add(graph.clone()); - if (this.selected != null) + } + if (this.selected != null) { selected = GuiUtils.find(cloneGraphs, this.selected.getModel() - .getModelId()); + .getModelId()); + } } ViewState clone = new ViewState(this.file, selected, cloneGraphs, this.globalConfigGroups); http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultPropView.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultPropView.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultPropView.java index d8724fc..3836137 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultPropView.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultPropView.java @@ -144,8 +144,9 @@ public class DefaultPropView extends View { List<String> keys = completeMet.getAllKeys(); Collections.sort(keys); for (String key : keys) { - if (key.endsWith("/envReplace")) + if (key.endsWith("/envReplace")) { continue; + } String values = StringUtils.join(completeMet.getAllMetadata(key), ","); Vector<String> row = new Vector<String>(); row.add(keyToGroupMap.get(key)); @@ -182,13 +183,16 @@ public class DefaultPropView extends View { } public Object getValueAt(int row, int col) { - if (row >= rows.size()) + if (row >= rows.size()) { return null; + } String value = rows.get(row).get(col); - if (value == null && col == 3) + if (value == null && col == 3) { return "false"; - if (value == null && col == 0) + } + if (value == null && col == 0) { return "__local__"; + } return value; } @@ -197,8 +201,9 @@ public class DefaultPropView extends View { return selected.getModel().getStaticMetadata() .containsGroup(state.getCurrentMetGroup()); } - if (col == 0) + if (col == 0) { return false; + } String key = rows.get(row).get(1); return key == null || (selected.getModel().getStaticMetadata() != null && selected @@ -241,12 +246,14 @@ public class DefaultPropView extends View { if (column == 0) { field.setForeground(Color.gray); } else { - if (isSelected) + if (isSelected) { field.setBorder(new EtchedBorder(1)); - if (table.isCellEditable(row, 1)) + } + if (table.isCellEditable(row, 1)) { field.setForeground(Color.black); - else + } else { field.setForeground(Color.gray); + } } return field; } @@ -309,16 +316,18 @@ public class DefaultPropView extends View { String key = getKey( (String) DefaultPropView.this.table.getValueAt(row, 1), state); Metadata staticMet = state.getSelected().getModel().getStaticMetadata(); - if (staticMet == null) + if (staticMet == null) { staticMet = new Metadata(); + } if (e.getActionCommand().equals(OVERRIDE)) { if (!staticMet.containsKey(key)) { staticMet.addMetadata(key, (String) DefaultPropView.this.table.getValueAt(row, 2)); String envReplace = (String) DefaultPropView.this.table.getValueAt( row, 3); - if (Boolean.valueOf(envReplace)) + if (Boolean.valueOf(envReplace)) { staticMet.addMetadata(key + "/envReplace", envReplace); + } state.getSelected().getModel().setStaticMetadata(staticMet); DefaultPropView.this.notifyListeners(); } @@ -333,8 +342,9 @@ public class DefaultPropView extends View { String key = getKey( (String) DefaultPropView.this.table.getValueAt(row, 1), state); Metadata staticMet = state.getSelected().getModel().getStaticMetadata(); - if (staticMet == null) + if (staticMet == null) { staticMet = new Metadata(); + } staticMet.removeMetadata(key); staticMet.removeMetadata(key + "/envReplace"); state.getSelected().getModel().setStaticMetadata(staticMet); @@ -350,8 +360,9 @@ public class DefaultPropView extends View { masterPanel.setLayout(new BoxLayout(masterPanel, BoxLayout.Y_AXIS)); masterPanel.add(this.getModelIdPanel(state.getSelected(), state)); masterPanel.add(this.getModelNamePanel(state.getSelected(), state)); - if (!state.getSelected().getModel().isParentType()) + if (!state.getSelected().getModel().isParentType()) { masterPanel.add(this.getInstanceClassPanel(state.getSelected(), state)); + } masterPanel.add(this.getExecutionTypePanel(state.getSelected(), state)); masterPanel.add(this.getPriorityPanel(state)); masterPanel.add(this.getExecusedIds(state.getSelected())); @@ -497,8 +508,9 @@ public class DefaultPropView extends View { private JList createJList(DefaultListModel model, final List<String> list) { - for (String value : list) + for (String value : list) { model.addElement(value); + } JList jList = new JList(model); jList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); jList.setLayoutOrientation(JList.VERTICAL); @@ -710,12 +722,13 @@ public class DefaultPropView extends View { checkbox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { - if (e.getStateChange() == ItemEvent.DESELECTED) + if (e.getStateChange() == ItemEvent.DESELECTED) { graph.getModel().setOptional(false); - else if (e.getStateChange() == ItemEvent.SELECTED) + } else if (e.getStateChange() == ItemEvent.SELECTED) { graph.getModel().setOptional(true); - else + } else { return; + } DefaultPropView.this.notifyListeners(); DefaultPropView.this.refreshView(state); } @@ -742,12 +755,13 @@ public class DefaultPropView extends View { checkbox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { - if (e.getStateChange() == ItemEvent.DESELECTED) + if (e.getStateChange() == ItemEvent.DESELECTED) { graph.getModel().getExcusedSubProcessorIds().remove(modelId); - else if (e.getStateChange() == ItemEvent.SELECTED) + } else if (e.getStateChange() == ItemEvent.SELECTED) { graph.getModel().getExcusedSubProcessorIds().add(modelId); - else + } else { return; + } DefaultPropView.this.notifyListeners(); } @@ -773,8 +787,9 @@ public class DefaultPropView extends View { System.out.println(oldKey + " " + oldValue + " " + oldEnvReplace); if (e.getType() == TableModelEvent.UPDATE) { Metadata staticMet = state.getSelected().getModel().getStaticMetadata(); - if (staticMet == null) + if (staticMet == null) { staticMet = new Metadata(); + } if (e.getColumn() == 1) { String newGrouplessKey = (String) table.getValueAt(e.getFirstRow(), e.getColumn()); @@ -789,11 +804,13 @@ public class DefaultPropView extends View { System.out.println("newKey: " + newKey); if (oldKey != null) { staticMet.replaceMetadata(newKey, staticMet.getAllMetadata(oldKey)); - if (staticMet.containsKey(oldKey + "/envReplace")) + if (staticMet.containsKey(oldKey + "/envReplace")) { staticMet.replaceMetadata(newKey, staticMet.getAllMetadata(oldKey + "/envReplace")); - if (!newKey.equals(oldKey)) + } + if (!newKey.equals(oldKey)) { staticMet.removeMetadata(oldKey); + } notifyListeners(); } else { staticMet.replaceMetadata(oldKey = newKey, (String) null); @@ -804,11 +821,12 @@ public class DefaultPropView extends View { e.getColumn()); if (oldKey.endsWith("/envReplace")) { newValue = newValue.toLowerCase(); - if (newValue.equals("false")) + if (newValue.equals("false")) { staticMet.removeMetadata(oldKey); - else + } else { staticMet.replaceMetadata(oldKey, Arrays.asList(newValue.split(","))); + } } else { staticMet.replaceMetadata(oldKey, Arrays.asList(newValue.split(","))); @@ -819,10 +837,11 @@ public class DefaultPropView extends View { if (oldKey != null) { String newEnvReplace = ((String) table.getValueAt(e.getFirstRow(), e.getColumn())).toLowerCase(); - if (newEnvReplace.equals("true")) + if (newEnvReplace.equals("true")) { staticMet.replaceMetadata(oldKey + "/envReplace", newEnvReplace); - else + } else { staticMet.removeMetadata(oldKey + "/envReplace"); + } notifyListeners(); } } @@ -840,10 +859,11 @@ public class DefaultPropView extends View { } private String getKey(String key, ViewState state) { - if (key != null && state.getCurrentMetGroup() != null) + if (key != null && state.getCurrentMetGroup() != null) { return state.getCurrentMetGroup() + "/" + key; - else + } else { return key; + } } } http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultTreeView.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultTreeView.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultTreeView.java index 51c517f..f679fa7 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultTreeView.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/DefaultTreeView.java @@ -86,8 +86,9 @@ public class DefaultTreeView extends View { // node.getChildAt(i)).getUserObject()); TreePath treePath = this.getTreePath( (DefaultMutableTreeNode) node.getChildAt(i), graph); - if (treePath != null) + if (treePath != null) { return treePath; + } } return null; } @@ -98,13 +99,15 @@ public class DefaultTreeView extends View { Stack<DefaultMutableTreeNode> stack = new Stack<DefaultMutableTreeNode>(); DefaultMutableTreeNode baseNode = (DefaultMutableTreeNode) currentPath .getLastPathComponent(); - for (int i = 0; i < baseNode.getChildCount(); i++) + for (int i = 0; i < baseNode.getChildCount(); i++) { stack.push((DefaultMutableTreeNode) baseNode.getChildAt(i)); + } while (!stack.empty()) { DefaultMutableTreeNode node = stack.pop(); if (node.getUserObject().equals("static-metadata")) { - for (int i = 0; i < node.getChildCount(); i++) + for (int i = 0; i < node.getChildCount(); i++) { stack.push((DefaultMutableTreeNode) node.getChildAt(i)); + } } else if (node.getUserObject() instanceof HashMap) { String key = (String) ((HashMap<String, String>) node.getUserObject()) .keySet().iterator().next(); @@ -114,8 +117,9 @@ public class DefaultTreeView extends View { lookingForPath = lookingForPath .substring(lookingForPath.indexOf("/") + 1); stack.clear(); - for (int i = 0; i < node.getChildCount(); i++) + for (int i = 0; i < node.getChildCount(); i++) { stack.add((DefaultMutableTreeNode) node.getChildAt(i)); + } } } } @@ -131,16 +135,18 @@ public class DefaultTreeView extends View { @Override public void refreshView(final ViewState state) { Rectangle visibleRect = null; - if (this.tree != null) + if (this.tree != null) { visibleRect = this.tree.getVisibleRect(); + } this.removeAll(); this.actionsMenu = this.createPopupMenu(state); DefaultMutableTreeNode root = new DefaultMutableTreeNode("WORKFLOWS"); - for (ModelGraph graph : state.getGraphs()) + for (ModelGraph graph : state.getGraphs()) { root.add(this.buildTree(graph, state)); + } tree = new JTree(root); tree.setShowsRootHandles(true); tree.setRootVisible(false); @@ -165,9 +171,10 @@ public class DefaultTreeView extends View { } } else if (Boolean.parseBoolean(state .getFirstPropertyValue(EXPAND_PRECONDITIONS))) { - if (treePath == null) + if (treePath == null) { treePath = this.getTreePath(root, state.getSelected() - .getPreConditions()); + .getPreConditions()); + } DefaultMutableTreeNode baseNode = (DefaultMutableTreeNode) treePath .getLastPathComponent(); for (int i = 0; i < baseNode.getChildCount(); i++) { @@ -180,9 +187,10 @@ public class DefaultTreeView extends View { } } else if (Boolean.parseBoolean(state .getFirstPropertyValue(EXPAND_POSTCONDITIONS))) { - if (treePath == null) + if (treePath == null) { treePath = this.getTreePath(root, state.getSelected() - .getPostConditions()); + .getPostConditions()); + } DefaultMutableTreeNode baseNode = (DefaultMutableTreeNode) treePath .getLastPathComponent(); for (int i = 0; i < baseNode.getChildCount(); i++) { @@ -231,14 +239,15 @@ public class DefaultTreeView extends View { metNode = (DefaultMutableTreeNode) path[i]; break; } else if (((DefaultMutableTreeNode) path[i]).getUserObject() instanceof HashMap) { - if (group == null) + if (group == null) { group = (String) ((HashMap<String, String>) ((DefaultMutableTreeNode) path[i]) .getUserObject()).keySet().iterator().next(); - else + } else { group = (String) ((HashMap<String, String>) ((DefaultMutableTreeNode) path[i]) .getUserObject()).keySet().iterator().next() - + "/" - + group; + + "/" + + group; + } } } ModelGraph graph = (ModelGraph) metNode.getUserObject(); @@ -312,8 +321,9 @@ public class DefaultTreeView extends View { .getSelectionPath().getLastPathComponent(); if (node.getUserObject() instanceof String && !(node.getUserObject().equals("pre-conditions") || node - .getUserObject().equals("post-conditions"))) + .getUserObject().equals("post-conditions"))) { return; + } orderSubMenu.setEnabled(node.getUserObject() instanceof ModelGraph && !((ModelGraph) node.getUserObject()).isCondition() && ((ModelGraph) node.getUserObject()).getParent() != null); @@ -338,8 +348,9 @@ public class DefaultTreeView extends View { JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.add(this.scrollPane, BorderLayout.CENTER); - if (visibleRect != null) + if (visibleRect != null) { this.tree.scrollRectToVisible(visibleRect); + } this.revalidate(); } @@ -349,13 +360,16 @@ public class DefaultTreeView extends View { DefaultMutableTreeNode metadataNode = new DefaultMutableTreeNode( "static-metadata"); Metadata staticMetadata = new Metadata(); - if (graph.getInheritedStaticMetadata(state) != null) + if (graph.getInheritedStaticMetadata(state) != null) { staticMetadata.replaceMetadata(graph.getInheritedStaticMetadata(state)); - if (graph.getModel().getStaticMetadata() != null) + } + if (graph.getModel().getStaticMetadata() != null) { staticMetadata.replaceMetadata(graph.getModel().getStaticMetadata()); + } this.addMetadataNodes(metadataNode, staticMetadata); - if (!metadataNode.isLeaf()) + if (!metadataNode.isLeaf()) { node.add(metadataNode); + } if (graph.getPreConditions() != null) { DefaultMutableTreeNode preConditions = new DefaultMutableTreeNode( @@ -377,9 +391,11 @@ public class DefaultTreeView extends View { } node.add(postConditions); } - for (ModelGraph child : graph.getChildren()) - if (!GuiUtils.isDummyNode(child.getModel())) + for (ModelGraph child : graph.getChildren()) { + if (!GuiUtils.isDummyNode(child.getModel())) { node.add(this.buildTree(child, state)); + } + } return node; } @@ -424,10 +440,11 @@ public class DefaultTreeView extends View { // node.getUserObject().equals("post-conditions"))) { ModelGraph graph = state.getSelected(); if (Boolean.parseBoolean(state - .getFirstPropertyValue(EXPAND_PRECONDITIONS))) + .getFirstPropertyValue(EXPAND_PRECONDITIONS))) { graphToFocus = graph.getPreConditions(); - else + } else { graphToFocus = graph.getPostConditions(); + } } else if (node.getUserObject() instanceof ModelGraph) { graphToFocus = (ModelGraph) node.getUserObject(); } @@ -454,11 +471,13 @@ public class DefaultTreeView extends View { ModelGraph graph = state.getSelected(); ModelGraph parent = graph.getParent(); if (e.getActionCommand().equals(TO_FRONT_ITEM_NAME)) { - if (parent.getChildren().remove(graph)) + if (parent.getChildren().remove(graph)) { parent.getChildren().add(0, graph); + } } else if (e.getActionCommand().equals(TO_BACK_ITEM_NAME)) { - if (parent.getChildren().remove(graph)) + if (parent.getChildren().remove(graph)) { parent.getChildren().add(graph); + } } else if (e.getActionCommand().equals(FORWARD_ITEM_NAME)) { int index = parent.getChildren().indexOf(graph); if (index != -1) { http://git-wip-us.apache.org/repos/asf/oodt/blob/abd71645/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/GlobalConfigView.java ---------------------------------------------------------------------- diff --git a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/GlobalConfigView.java b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/GlobalConfigView.java index f998e76..a73c698 100644 --- a/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/GlobalConfigView.java +++ b/app/weditor/src/main/java/org/apache/oodt/cas/workflow/gui/perspective/view/impl/GlobalConfigView.java @@ -69,8 +69,9 @@ public class GlobalConfigView extends View { public void refreshView(ViewState state) { Rectangle visibleRect = null; - if (this.tree != null) + if (this.tree != null) { visibleRect = this.tree.getVisibleRect(); + } DefaultMutableTreeNode root = new DefaultMutableTreeNode("GlobalConfig"); @@ -79,8 +80,9 @@ public class GlobalConfigView extends View { && globalConfig.keySet().equals( state.getGlobalConfigGroups().keySet()) && globalConfig.values().equals( - state.getGlobalConfigGroups().values())) + state.getGlobalConfigGroups().values())) { return; + } this.removeAll(); @@ -205,8 +207,9 @@ public class GlobalConfigView extends View { this.add(tabbedPane, BorderLayout.CENTER); - if (visibleRect != null) + if (visibleRect != null) { this.tree.scrollRectToVisible(visibleRect); + } this.revalidate(); }
