Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
.DS_Store
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# WARNING
# Notice
This package is forked from [php-integrator-symbol-viewer](https://github.com/tocjent/php-integrator-symbol-viewer).
This is a very helpful tool for PHP class. It is compatible with php-integrator ^3.0.0 now ^_^.

symbol-viewer was developed when php-integrator-base was around version 0.7 a few months ago.
Due to personal reasons I'm temporarily not able to maintain it and it's not going to work with php-integrator-base >=1.0.
If you would like to help with development and publishing of the package please let me know at [email protected]. Sorry for the inconvenience.
[The video](https://github.com/coolflyreg/php-integrator-symbol-viewer/releases/tag/0.6.5.video) is intro how to use this.

# php-integrator-symbol-viewer
Atom package providing side panel with class information: constants, properties and methods with go-to functionality provided by php-integrator-base package.
Expand Down
8 changes: 4 additions & 4 deletions lib/ConstantDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ module.exports = function ConstantDetailsView(constant) {
<h6>Name</h6>
<p>${constant.name}</p>
<h6>Type</h6>
<p>${constant.return.resolvedType}</p>
<p>${_.map(constant.types, 'resolvedType').join(', ')}</p>
<h6>Declared in</h6>
<p>${constant.declaringStructure.name}</p>
${_.isNil(constant.descriptions.short) ? `` : `
<p>${constant.declaringStructure.fqcn}</p>
${_.isNil(constant.shortDescriptions) ? `` : `
<h6>Description</h6>
<p>${constant.descriptions.short}</p>
<p>${constant.shortDescriptions}</p>
`}
</div>
`;
Expand Down
4 changes: 2 additions & 2 deletions lib/ConstantsListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module.exports = function ConstantsListView(constants, currentFigureName) {
class="list-element"
data-name="${constant.name}"
data-current-structure="${currentFigureName}"
data-declaring-structure-name="${constant.declaringStructure.name}"
data-declaring-structure-name="${constant.declaringStructure.fqcn}"
data-declaring-structure-file="${constant.declaringStructure.filename}"
data-declaring-structure-line="${constant.declaringStructure.startLineMember}">
<div class="title">
<div class="inherited ${currentFigureName !== constant.declaringStructure.name ? `active` : ``}"></div>
<div class="inherited ${'\\'+currentFigureName !== constant.declaringStructure.fqcn ? `active` : ``}"></div>
<div class="bullet">C</div>
<div class="name">
${constant.name}
Expand Down
5 changes: 3 additions & 2 deletions lib/FiguresView.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function FiguresView(figuresModel) {
<select class="figure-choice form-control">
${_.map(figuresModel, (figure) => `
<option value="${figure.name}">
${figure.type} ${figure.shortName}
${figure.type} ${figure.name}
</option>
`)}
</select>
Expand Down Expand Up @@ -61,7 +61,8 @@ module.exports = function FiguresView(figuresModel) {
if(showInheritedCheckbox.checked) {
element.style.display = 'block';
} else {
if(element.dataset.currentStructure === element.dataset.declaringStructureName) {
console.log('element.dataset = ' + JSON.stringify(element.dataset));
if('\\'+element.dataset.currentStructure === element.dataset.declaringStructureName) {
element.style.display = 'block';
}
}
Expand Down
9 changes: 4 additions & 5 deletions lib/MethodDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ module.exports = function MethodDetailsView(method) {
<h6>Name</h6>
<p>${method.name}</p>
<h6>Declared in</h6>
<p>${method.declaringStructure.name}</p>
<p>${method.declaringStructure.fqcn}</p>
${_.isEmpty(method.parameters) ? `` : `
<div class="parameters-list">
<h6>Parameters</h6>
${_.map(method.parameters, (p) => `
<span>
${p.type} $${p.name}
${_.map(p.types, 'resolvedType').join(', ')} $${p.name}
</span>
`)}
</div>
`}
<h6>Returns</h6>
<p>
${_.map(method.returnTypes, 'resolvedType').join(', ')}
</p>

<p>${_.map(method.returnTypes, 'resolvedType').join(', ')}</p>
${
_.isNil(method.shortDescription)
|| _.isEmpty(method.shortDescription)?
Expand Down
4 changes: 2 additions & 2 deletions lib/MethodsListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module.exports = function MethodsListView(methods, currentFigureName) {
class="list-element"
data-name="${method.name}"
data-current-structure="${currentFigureName}"
data-declaring-structure-name="${method.declaringStructure.name}"
data-declaring-structure-name="${method.declaringStructure.fqcn}"
data-declaring-structure-file="${method.declaringStructure.filename}"
data-declaring-structure-line="${method.declaringStructure.startLineMember}">
<div class="title">
<div class="inherited ${currentFigureName !== method.declaringStructure.name ? `active` : ``}"></div>
<div class="inherited ${'\\'+currentFigureName !== method.declaringStructure.fqcn ? `active` : ``}"></div>
<div class="bullet">M</div>
<div class="name">
${method.name}
Expand Down
4 changes: 2 additions & 2 deletions lib/PropertiesListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module.exports = function PropertiesListView(properties, currentFigureName) {
class="list-element"
data-name="${property.name}"
data-current-structure="${currentFigureName}"
data-declaring-structure-name="${property.declaringStructure.name}"
data-declaring-structure-name="${property.declaringStructure.fqcn}"
data-declaring-structure-file="${property.declaringStructure.filename}"
data-declaring-structure-line="${property.declaringStructure.startLineMember}">
<div class="title">
<div class="inherited ${currentFigureName !== property.declaringStructure.name ? `active` : ``}"></div>
<div class="inherited ${'\\'+currentFigureName !== property.declaringStructure.fqcn ? `active` : ``}"></div>
<div class="bullet">P</div>
<div class="name">
${property.name}
Expand Down
6 changes: 2 additions & 4 deletions lib/PropertyDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ module.exports = function PropertyDetailsView(property) {
<h6>Name</h6>
<p>${property.name}</p>
<h6>Type</h6>
<p>
${_.map(property.types, 'resolvedType').join(', ')}
</p>
<p>${_.map(property.types, 'resolvedType').join(', ')}</p>
<h6>Declared in</h6>
<p>${property.declaringStructure.name}</p>
<p>${property.declaringStructure.fqcn}</p>
${_.isNil(property.shortDescription) ? `` : `
<h6>Description</h6>
<p>${property.shortDescription}</p>
Expand Down
12 changes: 6 additions & 6 deletions lib/StaticMethodDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ module.exports = function StaticMethodDetailsView(staticMethod) {
<h6>Name</h6>
<p>${staticMethod.name}</p>
<h6>Declared in</h6>
<p>${staticMethod.declaringStructure.name}</p>
<p>${staticMethod.declaringStructure.fqcn}</p>
${_.isEmpty(staticMethod.parameters) ? `` : `
<div class="parameters-list">
<h6>Parameters</h6>
${_.map(staticMethod.parameters, (p) => `
<span>
${p.type} $${p.name}
${_.map(p.types, 'resolvedType').join(', ')} $${p.name}
</span>
`)}
</div>
`}
<h6>Returns</h6>
<p>${staticMethod.return.resolvedType}</p>
<p>${staticMethod.returnTypes.length > 0 ? staticMethod.returnTypes[0].resolvedType : ''}</p>
${
_.isNil(staticMethod.descriptions.short)
|| _.isEmpty(staticMethod.descriptions.short)?
_.isNil(staticMethod.shortDescription)
|| _.isEmpty(staticMethod.shortDescription)?
`` :
`<h6>Description</h6>
<p>${staticMethod.descriptions.short}</p>`
<p>${staticMethod.shortDescription}</p>`
}
</div>
`;
Expand Down
4 changes: 2 additions & 2 deletions lib/StaticMethodsListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module.exports = function StaticMethodsListView(staticMethods, currentFigureName
class="list-element"
data-name="${staticMethod.name}"
data-current-structure="${currentFigureName}"
data-declaring-structure-name="${staticMethod.declaringStructure.name}"
data-declaring-structure-name="${staticMethod.declaringStructure.fqcn}"
data-declaring-structure-file="${staticMethod.declaringStructure.filename}"
data-declaring-structure-line="${staticMethod.declaringStructure.startLineMember}">
<div class="title">
<div class="inherited ${currentFigureName !== staticMethod.declaringStructure.name ? `active` : ``}"></div>
<div class="inherited ${'\\'+currentFigureName !== staticMethod.declaringStructure.fqcn ? `active` : ``}"></div>
<div class="bullet">SM</div>
<div class="name">
${staticMethod.name}
Expand Down
4 changes: 2 additions & 2 deletions lib/StaticPropertiesListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ module.exports = function StaticPropertiesListView(staticProperties, currentFigu
class="list-element"
data-name="${staticProperty.name}"
data-current-structure="${currentFigureName}"
data-declaring-structure-name="${staticProperty.declaringStructure.name}"
data-declaring-structure-name="${staticProperty.declaringStructure.fqcn}"
data-declaring-structure-file="${staticProperty.declaringStructure.filename}"
data-declaring-structure-line="${staticProperty.declaringStructure.startLineMember}">
<div class="title">
<div class="inherited ${currentFigureName !== staticProperty.declaringStructure.name ? `active` : ``}"></div>
<div class="inherited ${'\\'+currentFigureName !== staticProperty.declaringStructure.fqcn ? `active` : ``}"></div>
<div class="bullet">SP</div>
<div class="name">
${staticProperty.name}
Expand Down
8 changes: 4 additions & 4 deletions lib/StaticPropertyDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ module.exports = function StaticPropertyDetailsView(staticProperty) {
<h6>Name</h6>
<p>${staticProperty.name}</p>
<h6>Type</h6>
<p>${staticProperty.return.resolvedType}</p>
<p>${_.map(staticProperty.types, 'resolvedType').join(', ')}</p>
<h6>Declared in</h6>
<p>${staticProperty.declaringStructure.name}</p>
${_.isNil(staticProperty.descriptions.short) ? `` : `
<p>${staticProperty.declaringStructure.fqcn}</p>
${_.isNil(staticProperty.shortDescription) ? `` : `
<h6>Description</h6>
<p>${staticProperty.descriptions.short}</p>
<p>${staticProperty.shortDescription}</p>
`}
</div>
`;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "php-integrator-symbol-viewer",
"main": "./lib/Main",
"version": "0.6.4",
"version": "0.6.5",
"description": "Atom package providing side panel with class information.",
"repository": "https://github.com/tocjent/php-integrator-symbol-viewer.git",
"license": "GPL-3.0",
Expand All @@ -11,7 +11,7 @@
"consumedServices": {
"php-integrator.service": {
"versions": {
"~1.0": "init"
"^3.0.0": "init"
}
}
},
Expand Down