• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Camelcade / Perl5-IDEA / #525521648

24 Jul 2025 06:24AM UTC coverage: 82.289% (+0.01%) from 82.279%
#525521648

push

github

hurricup
#2842 IJPL-197971 fixed RT access issue for path to package map

11 of 16 new or added lines in 8 files covered. (68.75%)

12 existing lines in 7 files now uncovered.

30991 of 37661 relevant lines covered (82.29%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/plugin/backend/src/main/java/com/perl5/lang/perl/idea/filetemplates/PerlFilePropertiesProvider.java
1
/*
2
 * Copyright 2015-2024 Alexandr Evstigneev
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.perl5.lang.perl.idea.filetemplates;
18

19
import com.intellij.ide.fileTemplates.DefaultTemplatePropertiesProvider;
20
import com.intellij.openapi.vfs.VfsUtilCore;
21
import com.intellij.openapi.vfs.VirtualFile;
22
import com.intellij.psi.PsiDirectory;
23
import com.perl5.lang.perl.util.PerlPackageUtil;
24
import com.perl5.lang.perl.util.PerlPackageUtilCore;
25
import org.jetbrains.annotations.NotNull;
26

27
import java.util.Properties;
28

29

30
public class PerlFilePropertiesProvider implements DefaultTemplatePropertiesProvider {
×
31
  @Override
32
  public void fillProperties(@NotNull PsiDirectory directory, @NotNull Properties props) {
33
    VirtualFile directoryFile = directory.getVirtualFile();
×
34
    VirtualFile newInnermostRoot = PerlPackageUtil.getClosestIncRoot(directory.getProject(), directoryFile);
×
35

36
    if (newInnermostRoot != null) {
×
37
      String newRelativePath = VfsUtilCore.getRelativePath(directoryFile, newInnermostRoot);
×
38
      props.put("PERL_PACKAGE_PREFIX",
×
NEW
39
                newRelativePath == null || newRelativePath.isEmpty() ? "" : PerlPackageUtilCore.getPackageNameByPath(newRelativePath));
×
40
    }
×
41
    else {
42
      props.put("PERL_PACKAGE_PREFIX", "");
×
43
    }
44
  }
×
45
}
46

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc