Skip to content

Commit

Permalink
Merge pull request eclipse-birt#546 from rrimmana/master
Browse files Browse the repository at this point in the history
Support relative path option in ExcelDataSource wizard when creating connection profile
  • Loading branch information
Yulin Wang authored Jul 15, 2019
2 parents 1ab8507 + 251c1ac commit 1cba3e3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.datatools.connectivity.oda.design.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.birt.report.data.oda.excel;bundle-version="[4.2.0,5.0.0)",
org.eclipse.core.resources
org.eclipse.core.resources,
org.eclipse.birt.report.designer.ui.data
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.birt.report.data.oda.excel.ui.wizards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
import java.util.List;
import java.util.Properties;

import org.eclipse.birt.report.designer.data.ui.util.DTPUtil;
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.oda.design.DesignFactory;
import org.eclipse.datatools.connectivity.oda.design.ResourceIdentifiers;
import org.eclipse.datatools.connectivity.oda.design.internal.ui.NewDataSourceWizardBase;
import org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSourceWizardPage;
import org.eclipse.jface.wizard.IWizard;
Expand Down Expand Up @@ -186,4 +189,27 @@ public void setPageComplete( boolean complete )
pageStatusChangedListeners.get( i ).update( true );
}
}

/**
* Returns the resource identifiers of the ODA consumer application, if available.
* @return a ResourceIdentifiers instance; may be null if none is specified
* @since 4.11.0
*/
protected ResourceIdentifiers getHostResourceIdentifiers()
{
ResourceIdentifiers designResourceIds = super.getHostResourceIdentifiers();

//Add support to show relative Path for browse button when used to create connection profile for Excel datasource
if(designResourceIds == null) {

designResourceIds = DesignFactory.eINSTANCE.createResourceIdentifiers( );
designResourceIds.setApplResourceBaseURI( DTPUtil.getInstance( )
.getBIRTResourcePath( ) );
designResourceIds.setDesignResourceBaseURI( DTPUtil.getInstance( )
.getReportDesignPath( ) );
}

return designResourceIds;

}
}

0 comments on commit 1cba3e3

Please sign in to comment.