Portfolio Performance Documentation
repository·master·Indexed 26 days ago
https://github.com/portfolio-performance/portfolioAn investment portfolio tracking and evaluation tool supporting stocks, cryptocurrencies, and other asset types. This documentation covers running the application in Eclipse via the LDSL plugin, technical implementation details for patched SWT fragments in product builds, and the Client domain model for managing securities, accounts, portfolios, watchlists, and taxonomies.
What's inside Portfolio Performance
- Portfolio Performance is a tool designed to track and evaluate the performance of investment portfolios. It supports various asset classes, including stocks, cryptocurrencies, and other financial assets.
Ship patched SWT via a feature patch in the product build
masterTo resolve version conflicts when shipping patched macOS SWT fragments (specifically for the TextKit-1 in-place-editor freeze fix), Portfolio Performance uses an Eclipse feature patch (
org.eclipse.swt.patch) instead of modifying the upstream RCP feature directly.This approach allows the product to redirect the exact version requirements of the
org.eclipse.e4.rcpfeature and theorg.eclipse.swthost bundle to re-qualified bundles published by the SWT fork (org.eclipse.swt.portfolio.bundles).Implementation Requirements
- Feature Patch Configuration: The patch must be applied in the product build. The
org.eclipse.e4.rcpversion infeatures/org.eclipse.swt.patch/feature.xmlmust be bumped manually on each platform upgrade to maintain the coupling. - SWT Fork Publishing: The SWT fork must republish the host bundle and all 9 platform fragments at the bumped qualifier. Even if only the
cocoafragment contains code changes, all fragments must be re-qualified because the host bundle exact-pins every fragment at its own version. - Repository Configuration: The SWT fork update-site must be added as an available-but-unrooted p2 repository in
portfolio-app/pom.xmlunder the<repositories>section.
Warning: Do NOT add the SWT fork as a target-definition root. Rooting both upstream SWT and the patched SWT fork would cause a singleton conflict for the
org.eclipse.swtbundle. By adding it as an unrooted repository, the target remains consistent with upstream SWT, and the feature patch handles the selection of the patched bundles during the product build.- Feature Patch Configuration: The patch must be applied in the product build. The
Access Portfolio Performance resources
masterUse the following links to access the official project resources:
- Homepage: https://www.portfolio-performance.info
- Downloads: Get the latest releases from the GitHub Releases page.
- Forum: Join the community discussion at the Portfolio Performance Forum.
- Manual: Consult the official User Manual for detailed instructions.
Run PortfolioPerformance in Eclipse
masterTo run PortfolioPerformance within the Eclipse IDE, you must use the LDSL plugin to dynamically create the necessary launch configurations, as these are OS-specific.
Follow these steps:
- Install the LDSL plugin from https://mduft.github.io/lcdsl-latest/.
- Open the Launch Configuration view by navigating to:
Window -> Show View -> Other... -> Debug -> Launch Configuration. - In the view, right-click on
Eclipse Application -> PortfolioPerformanceto execute the application.
Manage the Client domain model
masterTheClientclass is the core domain model representing a user's financial profile. It acts as a container for accounts, portfolios, securities, investment plans, taxonomies, and dashboards. It also manages client-wide settings and properties.Manage Watchlists in a Client
masterUse the following methods to manage watchlists:
addWatchlist(Watchlist watchlist): Adds a new watchlist.removeWatchlist(Watchlist watchlist): Removes a watchlist.swapWatchlist(Watchlist first, Watchlist second): Swaps the positions of two watchlists.getWatchlists(): Returns an unmodifiable list of all watchlists.
Retrieve all de-duplicated transactions
masterThe
getAllTransactions()method returns a list ofTransactionPair<?>objects. This list is 'de-duplicated', meaning it only includes:PortfolioTransactionobjects for buy and sell transactions.- Outbound transactions for cash or security transfers.
- It excludes
TRANSFER_INtype transactions from portfolios and certain types from accounts to provide a clean view of movements.
Mark Client as dirty or touched
masterTo trigger UI updates or recalculations, use the following methods:
markDirty(): Marks the client as dirty and fires adirtyproperty change event. This is intended to trigger a re-calculation of all views.touch(): Marks the client as 'touched' by firing atouchproperty change event, but does not trigger a re-calculation of views. Use this when only non-calculating properties (like preferences) have changed.
Listen for Client property changes
masterThe
Clientsupports the standard JavaPropertyChangeListenerpattern. You can register listeners to react to changes in the model (e.g., when securities, accounts, or watchlists are modified).addPropertyChangeListener(PropertyChangeListener listener): Adds a listener for all supported property changes.addPropertyChangeListener(String propertyName, PropertyChangeListener listener): Adds a listener for a specific property name.removePropertyChangeListener(PropertyChangeListener listener): Removes a listener.removePropertyChangeListener(String propertyName, PropertyChangeListener listener): Removes a listener for a specific property.
Manage Portfolios in a Client
masterUse the following methods to manage portfolios:
addPortfolio(Portfolio portfolio): Adds a new portfolio.removePortfolio(Portfolio portfolio): Removes a portfolio and its associated transactions and investment plans.getActivePortfolios(): Returns a sorted list of portfolios that are not marked as retired.getPortfolios(): Returns an unmodifiable list of all portfolios.
Extend Client data with Protobuf Any
masterThe
Clientsupports third-party extensions using Google ProtobufAnytypes. This allows preserving unknown extension data during load/save operations.addExtension(Any extension): Adds a protobufAnyobject to the extensions list.getExtensions(): Returns an unmodifiable list of extension data.setExtensions(List<Any> extensions): Sets the list of extension data.
Manage Taxonomies in a Client
masterUse the following methods to manage taxonomies:
addTaxonomy(Taxonomy taxonomy): Adds a new taxonomy.removeTaxonomy(Taxonomy taxonomy): Removes a taxonomy.swapTaxonomy(Taxonomy first, Taxonomy second): Swaps the positions of two taxonomies.getTaxonomy(String id): Retrieves a taxonomy by its unique identifier.getTaxonomies(): Returns an unmodifiable list of all taxonomies.