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
26 changes: 19 additions & 7 deletions lib/ConstantDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,27 @@ import _ from 'lodash';
module.exports = function ConstantDetailsView(constant) {
return `
<div class="details">
<h6>Name</h6>
<h6><strong>Name</strong></h6>
<p>${constant.name}</p>
<h6>Type</h6>
<p>${constant.return.resolvedType}</p>
<h6>Declared in</h6>

${
_.isEmpty(constant.types) ? `` : `
<p>
<h6><strong>Type</strong></h6>
${_.map(constant.types, (t) => `
<span>
${t.type} $${t.resolvedType}
</span>
`)}
</p>
`}

<h6><strong>Declared in</strong></h6>
<p>${constant.declaringStructure.name}</p>
${_.isNil(constant.descriptions.short) ? `` : `
<h6>Description</h6>
<p>${constant.descriptions.short}</p>

${_.isNil(constant.shortDescription) ? `` : `
<h6><strong>Description</strong></h6>
<p>${constant.shortDescription}</p>
`}
</div>
`;
Expand Down
4 changes: 3 additions & 1 deletion lib/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ module.exports = {
this.updatePanel(atom.views.getView(figuresModel));
});
}
var onError = (e) => console.warn(UPDATING_FAILED_MESSAGE, e.message);
var onError = (e) => {
console.warn(UPDATING_FAILED_MESSAGE, e);
}

var path = editor.buffer.file.path;
this.service.getClassListForFile(path, true).then(onSuccess, onError);
Expand Down
30 changes: 20 additions & 10 deletions lib/MethodDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,41 @@
import _ from 'lodash';

module.exports = function MethodDetailsView(method) {

return `
<div class="details">
<h6>Name</h6>
<h6><strong>Name</strong></h6>
<p>${method.name}</p>
<h6>Declared in</h6>
<h6><strong>Declared in</strong></h6>
<p>${method.declaringStructure.name}</p>
${_.isEmpty(method.parameters) ? `` : `
<div class="parameters-list">
<h6>Parameters</h6>
<p class="parameters-list">
<h6><strong>Parameters</strong></h6>
${_.map(method.parameters, (p) => `
<span>
${p.type} $${p.name}
</span>
`).join('<br>')}
</p>
`}

${
_.isEmpty(method.returnTypes) ? `` : `
<p class="parameters-list">
<h6><strong>Returns</strong></h6>
${_.map(method.returnTypes, (r) => `
<span>
${r.type} $${r.resolvedType}
</span>
`)}
</div>
</p>
`}
<h6>Returns</h6>
<p>
${_.map(method.returnTypes, 'resolvedType').join(', ')}
</p>

${
_.isNil(method.shortDescription)
|| _.isEmpty(method.shortDescription)?
`` :
`<h6>Description</h6>
`<h6><strong>Description</strong></h6>
<p>${method.shortDescription}</p>`
}
</div>
Expand Down
1 change: 1 addition & 0 deletions lib/PropertiesListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import _ from 'lodash';
import PropertyDetailsView from './PropertyDetailsView';

module.exports = function PropertiesListView(properties, currentFigureName) {

return _.isEmpty(properties) ? `` : `
<div class="list properties-list">
${_.map(properties, (property) => `
Expand Down
25 changes: 18 additions & 7 deletions lib/PropertyDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,29 @@
import _ from 'lodash';

module.exports = function PropertyDetailsView(property) {

return `
<div class="details">
<h6>Name</h6>
<h6><strong>Name</strong></h6>
<p>${property.name}</p>
<h6>Type</h6>
<p>
${_.map(property.types, 'resolvedType').join(', ')}
</p>
<h6>Declared in</h6>

${
_.isEmpty(property.types) ? `` : `
<p>
<h6><strong>Type</strong></h6>
${_.map(property.types, (t) => `
<span>
${t.type} $${t.resolvedType}
</span>
`)}
</p>
`}

<h6><strong>Declared in</strong></h6>
<p>${property.declaringStructure.name}</p>

${_.isNil(property.shortDescription) ? `` : `
<h6>Description</h6>
<h6><strong>Description</strong></h6>
<p>${property.shortDescription}</p>
`}
</div>
Expand Down
32 changes: 22 additions & 10 deletions lib/StaticMethodDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,42 @@
import _ from 'lodash';

module.exports = function StaticMethodDetailsView(staticMethod) {

return `
<div class="details">
<h6>Name</h6>
<h6><strong>Name</strong></h6>
<p>${staticMethod.name}</p>
<h6>Declared in</h6>
<h6><strong>Declared in</strong></h6>
<p>${staticMethod.declaringStructure.name}</p>
${_.isEmpty(staticMethod.parameters) ? `` : `
<div class="parameters-list">
<h6>Parameters</h6>
<h6><strong>Parameters</strong></h6>
${_.map(staticMethod.parameters, (p) => `
<span>${_.map(p.types,(pp)=>`${pp.type}`)}
$${p.name}
</span>
`).join('<br>')}
</div>
`}

${
_.isEmpty(staticMethod.returnTypes) ? `` : `
<div class="parameters-list">
<h6><strong>Returns</strong></h6>
${_.map(staticMethod.returnTypes, (t) => `
<span>
${p.type} $${p.name}
${t.type} $${t.resolvedType}
</span>
`)}
</div>
`}
<h6>Returns</h6>
<p>${staticMethod.return.resolvedType}</p>

${
_.isNil(staticMethod.descriptions.short)
|| _.isEmpty(staticMethod.descriptions.short)?
_.isNil(staticMethod.shortDescription)
|| _.isEmpty(staticMethod.shortDescription)?
`` :
`<h6>Description</h6>
<p>${staticMethod.descriptions.short}</p>`
`<h6><strong>Description</strong></h6>
<p>${staticMethod.shortDescription}</p>`
}
</div>
`;
Expand Down
1 change: 1 addition & 0 deletions lib/StaticPropertiesListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import _ from 'lodash';
import StaticPropertyDetailsView from './StaticPropertyDetailsView';

module.exports = function StaticPropertiesListView(staticProperties, currentFigureName) {

return _.isEmpty(staticProperties) ? `` : `
<div class="list static-properties-list">
${_.map(staticProperties, (staticProperty) => `
Expand Down
27 changes: 20 additions & 7 deletions lib/StaticPropertyDetailsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,30 @@
import _ from 'lodash';

module.exports = function StaticPropertyDetailsView(staticProperty) {

return `
<div class="details">
<h6>Name</h6>
<h6><strong>Name</strong></h6>
<p>${staticProperty.name}</p>
<h6>Type</h6>
<p>${staticProperty.return.resolvedType}</p>
<h6>Declared in</h6>

${
_.isEmpty(staticProperty.types) ? `` : `
<p>
<h6><strong>Type</strong></h6>
${_.map(staticProperty.types, (t) => `
<span>
${t.type} $${t.resolvedType}
</span>
`)}
</p>
`}

<h6><strong>Declared in</strong></h6>
<p>${staticProperty.declaringStructure.name}</p>
${_.isNil(staticProperty.descriptions.short) ? `` : `
<h6>Description</h6>
<p>${staticProperty.descriptions.short}</p>

${_.isNil(staticProperty.shortDescription) ? `` : `
<h6><strong>Description</strong></h6>
<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.7.0",
"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"
"^2.0": "init"
}
}
},
Expand Down
12 changes: 8 additions & 4 deletions styles/php-integrator-symbol-viewer.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ atom-php-integrator-symbol-viewer {
background: @app-background-color;

.toggle-button-container {
flex: 0;
display: flex;
align-items: center;
justify-content: flex-end;
Expand Down Expand Up @@ -54,7 +53,7 @@ atom-php-integrator-symbol-viewer atom-php-integrator-symbol-viewer-content {
min-height: 150px;
overflow-y: auto;
flex-direction: column;
font-size: 1.2em;
font-size: 1.0em;

.highlighted-letter {
color: @text-color-highlight !important;
Expand All @@ -70,6 +69,7 @@ atom-php-integrator-symbol-viewer atom-php-integrator-symbol-viewer-content {
.figure-choice {
color: @text-color !important;
background-color: @app-background-color !important;
font-size: 1.1em;
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@ atom-php-integrator-symbol-viewer atom-php-integrator-symbol-viewer-content {

.bullet {
flex-grow: 0;
font-size: 1.2em;
font-size: 1.0em;
width: 1.5em;
font-weight: 900;
text-align: right;
Expand All @@ -138,7 +138,7 @@ atom-php-integrator-symbol-viewer atom-php-integrator-symbol-viewer-content {

.info {
flex-grow: 0;
font-size: 1.5em;
font-size: 1.0em;
display: inline-block;
width: 1.5em;
margin-left: 0.5em;
Expand Down Expand Up @@ -196,6 +196,10 @@ atom-php-integrator-symbol-viewer atom-php-integrator-symbol-viewer-content {
flex-grow: 0;
flex-shrink: 0;
padding: @component-padding @component-padding * 1.5;

.setting-title {
font-size: 1.0em;
}
}

.search-container {
Expand Down